[issue19931] namedtuple docstrings are verbose for no added benefit
Ned Batchelder
report at bugs.python.org
Sun Dec 8 17:46:54 CET 2013
New submission from Ned Batchelder:
When I make a namedtuple, I get automatic docstrings that use a lot of words to say very little. Sphinx autodoc produces this:
```
class Key
Key(scope, user_id, block_scope_id, field_name)
__getnewargs__()
Return self as a plain tuple. Used by copy and pickle.
__repr__()
Return a nicely formatted representation string
block_scope_id None
Alias for field number 2
field_name None
Alias for field number 3
scope None
Alias for field number 0
user_id None
Alias for field number 1
```
The individual property docstrings offer no new information over the summary at the top. I'd like namedtuple to be not so verbose where it has no useful information to offer. The one-line summary is all the information namedtuple has, so that is all it should include in the docstring:
```
class Key
Key(scope, user_id, block_scope_id, field_name)
```
----------
components: Library (Lib)
messages: 205584
nosy: nedbat
priority: normal
severity: normal
status: open
title: namedtuple docstrings are verbose for no added benefit
versions: Python 2.7, Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19931>
_______________________________________
More information about the Python-bugs-list
mailing list