summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-23 12:02:35 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-23 12:02:35 (GMT)
commit213f229fbd00587112a8ca865f0e5ebebf3c8eba (patch)
tree746ead31bc7ff4439b130b26d645f95a2bf872e6 /Lib/pydoc.py
parent0e830455cbf5dc537b3d1bc1a513c5ba669390ae (diff)
downloadcpython-213f229fbd00587112a8ca865f0e5ebebf3c8eba.zip
cpython-213f229fbd00587112a8ca865f0e5ebebf3c8eba.tar.gz
cpython-213f229fbd00587112a8ca865f0e5ebebf3c8eba.tar.bz2
Issue #29338: Don't output an empty signature for class constructor.
Diffstat (limited to 'Lib/pydoc.py')
-rw-r--r--Lib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index f0c7cfc..4955540 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -917,7 +917,7 @@ class HTMLDoc(Doc):
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 @@ location listed above.
signature = None
if signature:
argspec = str(signature)
- if argspec:
+ if argspec and argspec != '()':
push(name + argspec + '\n')
doc = getdoc(object)