[docs] [issue19931] namedtuple docstrings are verbose for no added benefit

Raymond Hettinger report at bugs.python.org
Thu Mar 5 10:17:41 CET 2015

Raymond Hettinger added the comment:

I don't think we should strip-out all the docstrings because you're unhappy with automatically (mindlessly) generated documentation.  What you really need is more control over the documentation tool (the ability to save how much detail you want, particularly with subclasses of builtins which have a ton of methods with simplistic docstrings and with abstract base classes).  

The docstring for __repr__ isn't especially useful but it is a key feature of a namedtuple.  

The docstring for __getnewargs__ is informative especially if you're subclassing a named tuple and need to know what it is used for.   

The docstring for the individual property attributes doesn't look helpful when you list them all but does add information for one-at-a-time help, such as help(Key.blockscope), or for tooltips.   FWIW, there is also a proposal to make it easier to custom the default docstrings for the properties (to turn it into more of a data dictionary).

assignee: docs at python -> rhettinger
resolution:  -> rejected
status: open -> closed
versions:  -Python 2.7, Python 3.4

Python tracker <report at bugs.python.org>

More information about the docs mailing list