summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-25 20:47:52 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-25 20:47:52 (GMT)
commitcef5b3d411fb37fd7520858e092d90837569aa04 (patch)
tree5e0260b1d714ed4f389df28963b94756b703054d /Lib/pydoc.py
parente41251e864e94885d785b5a9bf8f824753316296 (diff)
downloadcpython-cef5b3d411fb37fd7520858e092d90837569aa04.zip
cpython-cef5b3d411fb37fd7520858e092d90837569aa04.tar.gz
cpython-cef5b3d411fb37fd7520858e092d90837569aa04.tar.bz2
Remove duplicated code in pydoc.py, probably a merge conflict some months ago.
Spotted by Humberto Diogenes.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 31122e1..c60a198 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1500,23 +1500,6 @@ def render_doc(thing, title='Python Library Documentation: %s', forceload=0):
def doc(thing, title='Python Library Documentation: %s', forceload=0):
"""Display text documentation, given an object or a path to an object."""
try:
- object, name = resolve(thing, forceload)
- desc = describe(object)
- module = inspect.getmodule(object)
- if name and '.' in name:
- desc += ' in ' + name[:name.rfind('.')]
- elif module and module is not object:
- desc += ' in module ' + module.__name__
- elif 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.
- object = type(object)
- desc += ' object'
pager(render_doc(thing, title, forceload))
except (ImportError, ErrorDuringImport) as value:
print(value)