]> granicus.if.org Git - python/commitdiff
Patch #1194449: correctly detect unbound methods in pydoc.
authorGeorg Brandl <georg@python.org>
Tue, 13 Mar 2007 22:16:30 +0000 (22:16 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 13 Mar 2007 22:16:30 +0000 (22:16 +0000)
Lib/pydoc.py

index d7c0d00019572634faf14a105c59b9a8866f1570..f69f73364ac10df52c499b83e06537b8560195b9 100755 (executable)
@@ -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: