Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
tupledict()
tupledict ( args, kwargs )
tupledict
constructor. Arguments are identical to those
of a Python dict
constructor.
Note that you will typically use
Model.addVars to build a
tupledict
.
Arguments:
args: Positional arguments.
kwargs: Named arguments.
Return value:
A tupledict object.
Example usage:
d = tupledict([((1,2), 'onetwo'), ((1,3), 'onethree'), ((2,3), 'twothree')]) print(d[1,2]) # prints 'onetwo'