diff options
author | phillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771> | 2007-10-26 02:20:31 +0000 |
---|---|---|
committer | phillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771> | 2007-10-26 02:20:31 +0000 |
commit | d40c63cc90c4f2b91395d54d868e608b6bedc93a (patch) | |
tree | d3c1f84c945d53dc11ae35e078145e08780ae763 /pydoc.py | |
parent | 0b8a19808b8a0addebd8591a1b1c5edd0ac3ed9f (diff) | |
download | python-setuptools-d40c63cc90c4f2b91395d54d868e608b6bedc93a.tar.gz |
Fix dependency on Python 2.5
git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@58661 6015fed2-1504-0410-9fe1-9d1591cc4771
Diffstat (limited to 'pydoc.py')
-rwxr-xr-x | pydoc.py | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -321,8 +321,6 @@ class Doc: # identifies something in a way that pydoc itself has issues handling; # think 'super' and how it is a descriptor (which raises the exception # by lacking a __name__ attribute) and an instance. - if inspect.isgetsetdescriptor(object): return self.docdata(*args) - if inspect.ismemberdescriptor(object): return self.docdata(*args) try: if inspect.ismodule(object): return self.docmodule(*args) if inspect.isclass(object): return self.docclass(*args) @@ -338,7 +336,7 @@ class Doc: name and ' ' + repr(name), type(object).__name__) raise TypeError, message - docmodule = docclass = docroutine = docother = docproperty = docdata = fail + docmodule = docclass = docroutine = docother = fail def getdocloc(self, object): """Return the location of module docs or None""" @@ -920,10 +918,6 @@ class HTMLDoc(Doc): lhs = name and '<strong>%s</strong> = ' % name or '' return lhs + self.repr(object) - def docdata(self, object, name=None, mod=None, cl=None): - """Produce html documentation for a data descriptor.""" - return self._docdescriptor(name, object, mod) - def index(self, dir, shadowed=None): """Generate an HTML index for a directory of modules.""" modpkgs = [] @@ -1277,10 +1271,6 @@ class TextDoc(Doc): """Produce text documentation for a property.""" return self._docdescriptor(name, object, mod) - def docdata(self, object, name=None, mod=None, cl=None): - """Produce text documentation for a data descriptor.""" - return self._docdescriptor(name, object, mod) - def docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None): """Produce text documentation for a data object.""" repr = self.repr(object) @@ -1410,14 +1400,6 @@ def describe(thing): return 'module ' + thing.__name__ if inspect.isbuiltin(thing): return 'built-in function ' + thing.__name__ - if inspect.isgetsetdescriptor(thing): - return 'getset descriptor %s.%s.%s' % ( - thing.__objclass__.__module__, thing.__objclass__.__name__, - thing.__name__) - if inspect.ismemberdescriptor(thing): - return 'member descriptor %s.%s.%s' % ( - thing.__objclass__.__module__, thing.__objclass__.__name__, - thing.__name__) if inspect.isclass(thing): return 'class ' + thing.__name__ if inspect.isfunction(thing): @@ -1474,8 +1456,6 @@ def doc(thing, title='Python Library Documentation: %s', forceload=0): if not (inspect.ismodule(object) or inspect.isclass(object) or inspect.isroutine(object) or - inspect.isgetsetdescriptor(object) or - inspect.ismemberdescriptor(object) or isinstance(object, property)): # If the passed object is a piece of data or an instance, # document its available methods instead of its value. |