summaryrefslogtreecommitdiff
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2012-04-23 21:26:58 -0700
committerRaymond Hettinger <python@rcn.com>2012-04-23 21:26:58 -0700
commite65753e09e9b8a383b68b71f7e39d597b0c61b68 (patch)
tree7c3536e4b7c5afbaac0d7235721fa4f9c7a8d0ca /Lib/pydoc.py
parentce0e0c7671a57f26b1765ef35197f6bffc0459ae (diff)
parent393b7b59a48b1cef11d76e9ca71cf8fa5972eda5 (diff)
downloadcpython-git-e65753e09e9b8a383b68b71f7e39d597b0c61b68.tar.gz
merge
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 674af6aacf..68ba21f30f 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1498,7 +1498,8 @@ def resolve(thing, forceload=0):
raise ImportError, 'no Python documentation found for %r' % thing
return object, thing
else:
- return thing, getattr(thing, '__name__', None)
+ name = getattr(thing, '__name__', None)
+ return thing, name if isinstance(name, str) else None
def render_doc(thing, title='Python Library Documentation: %s', forceload=0):
"""Render text documentation, given an object or a path to an object."""