[Python-checkins] r54366 - python/branches/release25-maint/Lib/pydoc.py
georg.brandl
python-checkins at python.org
Tue Mar 13 23:16:49 CET 2007
Author: georg.brandl
Date: Tue Mar 13 23:16:43 2007
New Revision: 54366
Modified:
python/branches/release25-maint/Lib/pydoc.py
Log:
Patch #1194449: correctly detect unbound methods in pydoc.
(backport from rev. 54365)
Modified: python/branches/release25-maint/Lib/pydoc.py
==============================================================================
--- python/branches/release25-maint/Lib/pydoc.py (original)
+++ python/branches/release25-maint/Lib/pydoc.py Tue Mar 13 23:16:43 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