UserSpace.doc#
- property UserSpace.doc#
Documentation string
docis a property ofModel, Space andCellsfor 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 andUserSpaceobjects in the Model are written at the top of the __init__.py files as if they are the docstrings of Python modules.The
docproperty of a Cells is linked to the docstring of its Formula if the Formula is not defined by a lambda function. When thedocproperty 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
See also
Cells.set_doc: Set docstring programmatically
Changed in version 0.14.0.