[Python-checkins] cpython: Issue #29338: Don't output an empty signature for class constructor.
serhiy.storchaka
python-checkins at python.org
Mon Jan 23 07:02:50 EST 2017
https://hg.python.org/cpython/rev/cebc9c7ad195
changeset: 106288:cebc9c7ad195
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Jan 23 14:02:35 2017 +0200
summary:
Issue #29338: Don't output an empty signature for class constructor.
files:
Lib/pydoc.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -917,7 +917,7 @@
signature = None
if signature:
argspec = str(signature)
- if argspec:
+ if argspec and argspec != '()':
decl = name + self.escape(argspec) + '\n\n'
doc = getdoc(object)
@@ -1236,7 +1236,7 @@
signature = None
if signature:
argspec = str(signature)
- if argspec:
+ if argspec and argspec != '()':
push(name + argspec + '\n')
doc = getdoc(object)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list