diff options
author | Georg Brandl <georg@python.org> | 2007-03-13 22:16:43 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-03-13 22:16:43 (GMT) |
commit | afa4f485dd43b1c6555abc34505d20deb6aed141 (patch) | |
tree | 908222cef5e3813e07e7aab11a67cd24c0541d22 /Lib/pydoc.py | |
parent | d6e73c1785aeee14c31a11171732f60ab5d852a5 (diff) | |
download | cpython-afa4f485dd43b1c6555abc34505d20deb6aed141.zip cpython-afa4f485dd43b1c6555abc34505d20deb6aed141.tar.gz cpython-afa4f485dd43b1c6555abc34505d20deb6aed141.tar.bz2 |
Patch #1194449: correctly detect unbound methods in pydoc.
(backport from rev. 54365)
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 0a24dc1..883ead0 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: |