diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-23 13:50:05 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-23 13:50:05 -0400 |
commit | 9bc36530831b3b59b68b0579aeb01cd27ea36c20 (patch) | |
tree | 44bbc2caba84e803133e097cfb517d93e6bba2a7 /Lib/pydoc.py | |
parent | db780d0d13976b099b22bc5145a53ec3ff6c63ba (diff) | |
parent | 8c52ab597f6f3fc17bdcd157ed53c88e016ae2bb (diff) | |
download | cpython-git-9bc36530831b3b59b68b0579aeb01cd27ea36c20.tar.gz |
merge heads
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 8b94993928..b319d11b5e 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1521,7 +1521,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, renderer=None): |