Patch #1194449: correctly detect unbound methods in pydoc.

This commit is contained in:
Georg Brandl 2007-03-13 22:16:30 +00:00
parent 03b90d8cfd
commit 7e2b6bb24f
1 changed files with 2 additions and 2 deletions

View File

@ -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: