diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 0a24dc1b109..883ead01e37 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -855,7 +855,7 @@ def docroutine(self, object, name=None, mod=None, 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 @@ def docroutine(self, object, name=None, mod=None, cl=None): 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: