diff --git a/Lib/pydoc.py b/Lib/pydoc.py index e34fccbbf02..1bb50fdb153 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -258,8 +258,9 @@ def page(self, title, contents): return '''
%s\n' % self.small(doc) + result = result + '
%s
\n' % self.small(doc) if hasattr(object, '__path__'): modpkgs = [] @@ -575,7 +576,7 @@ def docroutine(self, object, name=None, skipdocs = 0 if inspect.ismethod(object): if cl: - if not cl.__dict__.has_key(name): + if object.im_class is not cl: base = object.im_class url = '#%s-%s' % (base.__name__, name) basename = base.__name__ @@ -595,7 +596,7 @@ def docroutine(self, object, name=None, else: if (cl and cl.__dict__.has_key(realname) and cl.__dict__[realname] is object): - reallink = '%s' % ( + reallink = '%s' % ( cl.__name__ + '-' + realname, realname) skipdocs = 1 else: @@ -846,7 +847,7 @@ def docroutine(self, object, name=None, cl=None): skipdocs = 0 if inspect.ismethod(object): if cl: - if not cl.__dict__.has_key(name): + if object.im_class is not cl: base = object.im_class basename = base.__name__ if base.__module__ != cl.__module__: