diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-02-17 00:45:42 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-02-17 00:45:42 (GMT) |
commit | 77c041ba64f87ac021c2a7a9314d9a3a1145057f (patch) | |
tree | e0f19e9fa4974fe541862907eae85fe1c3b5ba0a /Lib/pydoc.py | |
parent | 43036a66c37075534febdc4a4caaae8a364a9942 (diff) | |
parent | 54237f9feaefd209c2aaa5b4003810e69f6714f3 (diff) | |
download | cpython-77c041ba64f87ac021c2a7a9314d9a3a1145057f.zip cpython-77c041ba64f87ac021c2a7a9314d9a3a1145057f.tar.gz cpython-77c041ba64f87ac021c2a7a9314d9a3a1145057f.tar.bz2 |
merge 3.4 (#21548)
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 60b0a9e5..1fc8cc7 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -269,7 +269,7 @@ def synopsis(filename, cache={}): except: return None del sys.modules['__temp__'] - result = (module.__doc__ or '').splitlines()[0] + result = module.__doc__.splitlines()[0] if module.__doc__ else None # Cache the result. cache[filename] = (mtime, result) return result @@ -2073,7 +2073,7 @@ class ModuleScanner: if onerror: onerror(modname) continue - desc = (module.__doc__ or '').splitlines()[0] + desc = module.__doc__.splitlines()[0] if module.__doc__ else '' path = getattr(module,'__file__',None) name = modname + ' - ' + desc if name.lower().find(key) >= 0: |