[docs] [issue16568] allow constructors to be documented separately from class

Ezio Melotti report at bugs.python.org
Thu Nov 29 04:53:24 CET 2012

Ezio Melotti added the comment:

This came up while documenting the str type in datamodel.rst (IIRC), and linking to it from functions.rst.

On one hand you want to say what the str type is, on the other hand you want to document the constructor and explain how can you use str() to obtain str objects.
Putting both under the constructor doesn't work too well, especially when there's a lot of text.  Putting the str type description in a plain paragraph before the "class" directive doesn't work too well either, because :class:`str` will link to the constructor documentation.

The idea is to keep the two separate but still provide an easy way to link to the class without missing the general description.


Python tracker <report at bugs.python.org>

More information about the docs mailing list