Doc strings for a standalone app??

j_mckitrick j_mckitrick at
Thu Jun 10 12:36:21 CEST 2004

Peter Hansen <peter at> wrote in message news:<TJKdnU62dcH5bVvdRVn-gQ at>...

> The only thing I can think of to ask about that is "Why
> would you *not* want to use doc strings?".  There is
> no significant overhead associated with them, so you
> don't really lose.  They have potential advantages, given
> that the docs are available at runtime, more clearly
> identifiable as documentation, etc, whereas the other
> form of comments have no advantages for this kind of
> thing.  So why not use them?

Well, I can see that doc strings can be useful at the beginning of
each module/class/method/function.  But since comments can be spread
throughout the code, explaining logic as needed, aren't they more
useful to someone who needs to maintain, rather than just use, your

It SEEMS to me that doc strings are for those who will USE your code,
and comments for those who will MAINTAIN it.  Does that make any


More information about the Python-list mailing list