summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-23 14:02:35 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-23 14:02:35 +0200
commit34d09d9470d0b52ce9c8ad8aff796bd116c0dd7f (patch)
tree5bb0a01aab071064cf711b5367798a85b17a37ea /Lib
parenta1818e636648a06d61ba4e834aa0cd0d775ffe32 (diff)
downloadcpython-34d09d9470d0b52ce9c8ad8aff796bd116c0dd7f.tar.gz
Issue #29338: Don't output an empty signature for class constructor.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index f0c7cfce2e..49555405c5 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)