From: Ka-Ping Yee Date: Fri, 23 Mar 2001 14:05:53 +0000 (+0000) Subject: Browser compatibility fixes. X-Git-Tag: v2.1b2~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e280c06d5910eca5bcded37611033bb11bc17110;p=thirdparty%2FPython%2Fcpython.git Browser compatibility fixes. Show methods aliased into a class from other classes. --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index e34fccbbf028..1bb50fdb153e 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -258,8 +258,9 @@ class HTMLDoc(Doc): return ''' Python: %s - - + %s ''' % (title, contents) @@ -440,7 +441,7 @@ class HTMLDoc(Doc): modules = inspect.getmembers(object, inspect.ismodule) - if 0 and hasattr(object, '__all__'): + if 0 and hasattr(object, '__all__'): # disabled for now visible = lambda key, all=object.__all__: key in all else: visible = lambda key: key[:1] != '_' @@ -473,7 +474,7 @@ class HTMLDoc(Doc): doc = self.markup(getdoc(object), self.preformat, fdict, cdict) doc = doc and '%s' % doc - result = result + '

%s\n' % self.small(doc) + result = result + '

%s

\n' % self.small(doc) if hasattr(object, '__path__'): modpkgs = [] @@ -575,7 +576,7 @@ class HTMLDoc(Doc): 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 @@ class HTMLDoc(Doc): 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 @@ class TextDoc(Doc): 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__: