summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-03-13 22:16:30 (GMT)
committerGeorg Brandl <georg@python.org>2007-03-13 22:16:30 (GMT)
commit7e2b6bb24f58d134239cd2641cb5a6b4dbc3c917 (patch)
tree34235aa3a8c69fcbeac73e9f1a814392da7027d0 /Lib/pydoc.py
parent03b90d8cfde0e74ec633f79201b53aada21bf42c (diff)
downloadcpython-7e2b6bb24f58d134239cd2641cb5a6b4dbc3c917.zip
cpython-7e2b6bb24f58d134239cd2641cb5a6b4dbc3c917.tar.gz
cpython-7e2b6bb24f58d134239cd2641cb5a6b4dbc3c917.tar.bz2
Patch #1194449: correctly detect unbound methods in pydoc.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index d7c0d00..f69f733 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: