Is it posible to use docstring for plain variable? For example I have module called t
def f():
\"\"\"f\"\"\"
l = lambda x: x
\"\"\"l\"\"\"
Sphinx has a built-in syntax for documenting attributes (i.e. NOT the values as @duncan describes). Examples:
#: This is module attribute
x = 42
class MyClass:
#: This is a class attribute
y = 43
You can read more in the Sphinx docs: http://www.sphinx-doc.org/en/1.4.8/ext/autodoc.html#directive-autoattribute
...or in this other question: How to document a module constant in Python?