[New-bugs-announce] [issue30959] Constructor signature is duplicated in the help of namedtuples

Serhiy Storchaka report at bugs.python.org
Tue Jul 18 07:04:22 EDT 2017


New submission from Serhiy Storchaka:

The docstring of namedtuple class starts with the signature of the constructor. But pydoc now outputs the signature of the constructor for classes (see issue29338). As a result, the signature is duplicated in the output.

For example:

$ ./python -m pydoc functools._CacheInfo
Help on class CacheInfo in functools:

functools._CacheInfo = class CacheInfo(builtins.tuple)
 |  functools._CacheInfo(hits, misses, maxsize, currsize)
 |  
 |  CacheInfo(hits, misses, maxsize, currsize)
 |  
 |  Method resolution order:
...

----------
components: Library (Lib)
messages: 298582
nosy: ncoghlan, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Constructor signature is duplicated in the help of namedtuples
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30959>
_______________________________________


More information about the New-bugs-announce mailing list