]> granicus.if.org Git - python/commitdiff
Issue #29338: Don't output an empty signature for class constructor.
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 23 Jan 2017 12:02:35 +0000 (14:02 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 23 Jan 2017 12:02:35 +0000 (14:02 +0200)
Lib/pydoc.py

index f0c7cfce2e4f0713f0a192b2326bd367049c58d1..49555405c56016f0bff7aedfc6cd2ad5b36f1197 100644 (file)
@@ -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)