docstrings vs language comments

Sridhar R sridharinfinity at yahoo.com
Sun Jun 20 14:27:27 EDT 2004


When writing a python library, we can use docstrings for methods and
functions that are part of API.  But what about comments for non-API
objects or python application code?

For applications, docstrings are not really much useful. Instead
language comments are prefered for them.

Language comments (starting with #) are usually considered to be a
little more readable than docstrings (when reading the source code for
understanding it).

So for non-API objects language comments will be prefered.

Thoughts?



More information about the Python-list mailing list