diff options
| author | Georg Brandl <georg@python.org> | 2012-03-17 16:54:17 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2012-03-17 16:54:17 +0100 |
| commit | 14c6fad64412df69b55e4dccf231a149a7980d29 (patch) | |
| tree | 0e07cf5822d54c52f1b9b29c63bcf41011f026c6 /doc/ext | |
| parent | 79fe3cb0aa6a63a9099cbc2e7bb197d209918fd3 (diff) | |
| download | sphinx-14c6fad64412df69b55e4dccf231a149a7980d29.tar.gz | |
Make it clearer how autodoc special comments have to be formatted.
Diffstat (limited to 'doc/ext')
| -rw-r--r-- | doc/ext/autodoc.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/ext/autodoc.rst b/doc/ext/autodoc.rst index ab520f70..859ca6fc 100644 --- a/doc/ext/autodoc.rst +++ b/doc/ext/autodoc.rst @@ -194,12 +194,13 @@ inserting them into the page source under a suitable :rst:dir:`py:module`, automethod autoattribute - These work exactly like :rst:dir:`autoclass` etc., but do not offer the options - used for automatic member documentation. + These work exactly like :rst:dir:`autoclass` etc., but do not offer the + options used for automatic member documentation. For module data members and class attributes, documentation can either be put - into a special-formatted comment, or in a docstring *after* the definition. - Comments need to be either on a line of their own *before* the definition, or + into a comment with special formatting (using a ``#:`` to start the comment + instead of just ``#``), or in a docstring *after* the definition. Comments + need to be either on a line of their own *before* the definition, or immediately after the assignment *on the same line*. The latter form is restricted to one line only. |
