- property Cells.doc#
docis a property of
Model, Space and
Cellsfor setting and getting a string to document the object.
When a Model is written to files by
write_model()or its variants, the docsting of the Model and
UserSpaceobjects in the Model are written at the top of the __init__.py files as if they are the docstrings of Python modules.
docproperty of a Cells is linked to the docstring of its Formula if the Formula is not defined by a lambda function. When the
docproperty of a Cells is updated, then the docstring of the Cells’ Formula is also updated, and vice versa:
>>> foo.formula def foo(x): """The docstring of foo""" return x >>> foo.doc 'The docstring of foo' >>> foo.doc = "The doc propery of foo" >>> foo.formula def foo(x): """The doc propery of foo""" return x
Changed in version 0.14.0.