From 213f229fbd00587112a8ca865f0e5ebebf3c8eba Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 23 Jan 2017 14:02:35 +0200 Subject: Issue #29338: Don't output an empty signature for class constructor. --- Lib/pydoc.py | 4 ++-- 1 file 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) -- cgit v0.12