DynamicSpace.itemspaces#
- property DynamicSpace.itemspaces#
Read-only mapping of parameter arguments to
ItemSpaceobjects.Returns a dictionary-like view of all
ItemSpaceinstances created from this parameterized space. Each key is a tuple (or single value) of arguments, and each value is the corresponding ItemSpace.This property is only meaningful for spaces with parameters defined. For spaces without parameters, this returns an empty mapping.
The keys are automatically “untuplized” for single-parameter spaces, meaning a single value is used instead of a 1-tuple.
- Returns:
Read-only mapping of arguments to ItemSpace objects
- Return type:
MappingProxyType
Example
>>> space.parameters = ('x', 'y') >>> space[1, 2] # Create ItemSpace >>> space[3, 4] # Create another ItemSpace >>> space.itemspaces {(1, 2): <ItemSpace Model1.Space1[1, 2]>, (3, 4): <ItemSpace Model1.Space1[3, 4]>} >>> # Single parameter - keys are not tuples >>> space2.parameters = ('t',) >>> space2[10] >>> space2.itemspaces {10: <ItemSpace Model1.Space2[10]>}
See also
parameters: Parameter names for this spaceItemSpace: Dynamic parameterized space instancesclear_at(): Delete specific ItemSpaceclear_items(): Delete all ItemSpaces