[Python-checkins] r54365 - python/trunk/Lib/pydoc.py

georg.brandl python-checkins at python.org
Tue Mar 13 23:16:38 CET 2007


Author: georg.brandl
Date: Tue Mar 13 23:16:30 2007
New Revision: 54365

Modified:
   python/trunk/Lib/pydoc.py
Log:
Patch #1194449: correctly detect unbound methods in pydoc.


Modified: python/trunk/Lib/pydoc.py
==============================================================================
--- python/trunk/Lib/pydoc.py	(original)
+++ python/trunk/Lib/pydoc.py	Tue Mar 13 23:16:30 2007
@@ -855,7 +855,7 @@
                 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 @@
                 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:


More information about the Python-checkins mailing list