Issue 926501: (ref-manual) position docstrings in source not documented (original) (raw)

A colleaque of mine could not find anything about doc strings in the Python language ref manual. I checked his claim and found that there is indeed very little documented about docstrings in it.

The current (online) ref manual has a number of doc entries in the index, they all point to structure descriptions of internal objects (like a function object). A 'documentation string' entry points to the docstring of a code object.

What is not documented is where docstrings come from, i.e. where in my program should I put it to make it appear as doc attribute. The grammar only discusses Python statements.