From: Georg Brandl Date: Tue, 13 Mar 2007 22:16:30 +0000 (+0000) Subject: Patch #1194449: correctly detect unbound methods in pydoc. X-Git-Tag: v2.6a1~2002 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e2b6bb24f58d134239cd2641cb5a6b4dbc3c917;p=python Patch #1194449: correctly detect unbound methods in pydoc. --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index d7c0d00019..f69f73364a 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -855,7 +855,7 @@ class HTMLDoc(Doc): if imclass is not cl: note = ' from ' + self.classlink(imclass, mod) else: - if object.im_self: + if object.im_self is not None: note = ' method of %s instance' % self.classlink( object.im_self.__class__, mod) else: @@ -1226,7 +1226,7 @@ class TextDoc(Doc): if imclass is not cl: note = ' from ' + classname(imclass, mod) else: - if object.im_self: + if object.im_self is not None: note = ' method of %s instance' % classname( object.im_self.__class__, mod) else: