UserSpace.del_formula#

UserSpace.del_formula()[source]#

Delete the parameter formula from this space.

Removes the parameter formula, converting this space from a parameterized space back to a regular non-parameterized space. All existing child ItemSpace instances are deleted.

After deletion:

  • parameters returns None

  • itemspaces is empty

  • The space can no longer be called with arguments

Example

>>> space = model.new_space('MySpace')
>>> space.parameters = ('x', 'y')
>>> space[1, 2]  # Creates ItemSpace
>>> space.parameters
('x', 'y')

>>> space.del_formula()
>>> space.parameters
None
>>> len(space.itemspaces)
0

See also