āžœ

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients Arfrever, docs@python, eli.bendersky, eric.araujo, ezio.melotti, flox, leonov, scoder
Date 2012-02-23.03:47:16
SpamBayes Score 1.30451e-14
Marked as misclassified No
Message-id <1329968837.3.0.273301679104.issue14006@psf.upfronthosting.co.za>
In-reply-to
Content
My general rule is that function/method docstrings are better short descriptions of what the function does and what the arguments are, a usage reminder for people who have already used the function.  Classes docstrings can tell a bit more about how the class is supposed to be used, e.g. what particular responsibility they have and what they work with.  Module docstrings should help you make sense of the public objects in the module, for example tell about the main classes and functions and briefly mentioning the less important ones.

This is a personal viewpoint; some people use dir and pydoc a lot to get the most info out of a new module, whereas I like separate documentation more.

ElementTree has no docstrings at all, which is IMO bad; Iā€™d like the javadoc comments to be turned into docstrings, and if they are too big they can be reduced to their core and the extra help moved to reST docs (which are at this moment in what looks like a good shape: they have the same info as the javadoc comments from a quick glance).

I think some of the comments can just be deleted, like the @see lines.  Finally, a note about the comments for attributes: they should be documented in the reST docs, and for the Python code you have two possibilities: you can document them in the class docstring, or put string literals after them (see http://www.python.org/dev/peps/pep-0258/#attribute-docstrings ā€“ they are discarded by Python, so not available to help/pydoc, but some tools can process them).
History
Date User Action Args
2012-02-23 03:47:17eric.araujosetrecipients: + eric.araujo, scoder, ezio.melotti, Arfrever, eli.bendersky, leonov, flox, docs@python
2012-02-23 03:47:17eric.araujosetmessageid: <1329968837.3.0.273301679104.issue14006@psf.upfronthosting.co.za>
2012-02-23 03:47:16eric.araujolinkissue14006 messages
2012-02-23 03:47:16eric.araujocreate