ItemSpace.info#

property ItemSpace.info#

An object whose repr summarizes this Interface.

Warning

This is an experimental feature. Its output format and behavior may change in future releases without notice.

Returns a lightweight wrapper whose string representation displays a human-readable snapshot of this object. The exact fields depend on the concrete type:

  • For Model: the model’s name, the number of top-level spaces and an abbreviated list of their names.

  • For spaces (UserSpace, ItemSpace, DynamicSpace): the space’s fully-qualified representation (e.g., Model1.Space1[1]), the list of base spaces’ fullnames, parameters (when defined, shown as a signature string such as i, j=0), the number of ItemSpace children, and an abbreviated list of the item-space keys.

  • For Cells: the cells’ fully-qualified representation including its signature (e.g., Model1.Space1[1].foo(t, i=0)), whether the cells is derived from a base space, is_cached, allow_none, the source of the formula, the number of cached values together with an abbreviated listing of cached key-value pairs, and – when any input values have been assigned – the number of input values along with an abbreviated listing of input key-value pairs.

Examples

For a Model:

>>> model.info
Model: Model1
spaces: 1
    ['Space1']

For a UserSpace:

>>> model.Space1.info
UserSpace: Model1.Space1
bases: []
parameters: i, j=0
itemspaces: 2
    [(1, 0), (2, 0)]

For an ItemSpace:

>>> model.Space1[1].info
ItemSpace: Model1.Space1[1, 0]
bases: []
itemspaces: 0

For a DynamicSpace, the layout matches ItemSpace but the header class name is DynamicSpace.

For Cells:

>>> model.Space1[1].foo.info
Cells: Model1.Space1[1].foo(t, i=0)
is_derived: False
is_cached: True
allow_none: None
formula:
    def foo(t, i=0):
        if t == 0:
            return i
        return foo(t - 1, i) + 1
cached values: 1
    (0, 0): 0