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 <rep...@bugs.python.org>
<http://bugs.python.org/issue30959>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to