diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 14:02:35 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 14:02:35 +0200 |
commit | 34d09d9470d0b52ce9c8ad8aff796bd116c0dd7f (patch) | |
tree | 5bb0a01aab071064cf711b5367798a85b17a37ea /Lib | |
parent | a1818e636648a06d61ba4e834aa0cd0d775ffe32 (diff) | |
download | cpython-34d09d9470d0b52ce9c8ad8aff796bd116c0dd7f.tar.gz |
Issue #29338: Don't output an empty signature for class constructor.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pydoc.py | 4 |
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) |