[issue10549] help(cls1) breaks when cls1 has staticmethod(cls2) attribute

Alexander Belopolsky report at bugs.python.org
Sat Nov 27 19:27:49 CET 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

The fix is simple:


--- Lib/pydoc.py	(revision 86824)
+++ Lib/pydoc.py	(working copy)
@@ -1110,7 +1110,7 @@
         result = result + self.section('FILE', file)
         return result
 
-    def docclass(self, object, name=None, mod=None):
+    def docclass(self, object, name=None, mod=None, *ignored):
         """Produce text documentation for a given class object."""
         realname = object.__name__
         name = name or realname

I think this is the right thing to do because HTMLDoc.docclass() has the following signature.


    def docclass(self, object, name=None, mod=None, funcs={}, classes={},
                 *ignored):

----------
stage: needs patch -> unit test needed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10549>
_______________________________________


More information about the Python-bugs-list mailing list