ItemSpace.doc#
- property ItemSpace.doc#
Documentation string
doc
is a property ofModel
, Space andCells
for 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 andUserSpace
objects in the Model are written at the top of the __init__.py files as if they are the docstrings of Python modules.The
doc
property of a Cells is linked to the docstring of its Formula if the Formula is not defined by a lambda function. When thedoc
property 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
Changed in version 0.14.0.