changeset: 95752:d1b9eb9de8af branch: 2.7 parent: 95746:3cf2990d19ab user: Serhiy Storchaka date: Tue Apr 21 21:09:23 2015 +0300 files: Lib/pydoc.py Misc/NEWS description: Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. diff -r 3cf2990d19ab -r d1b9eb9de8af Lib/pydoc.py --- a/Lib/pydoc.py Mon Apr 20 18:20:27 2015 -0400 +++ b/Lib/pydoc.py Tue Apr 21 21:09:23 2015 +0300 @@ -1540,7 +1540,7 @@ """Given an object or a path to an object, get the object and its name.""" if isinstance(thing, str): object = locate(thing, forceload) - if not object: + if object is None: raise ImportError, 'no Python documentation found for %r' % thing return object, thing else: diff -r 3cf2990d19ab -r d1b9eb9de8af Misc/NEWS --- a/Misc/NEWS Mon Apr 20 18:20:27 2015 -0400 +++ b/Misc/NEWS Tue Apr 21 21:09:23 2015 +0300 @@ -21,6 +21,8 @@ Library ------- +- Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. + - Issue #23842: os.major(), os.minor() and os.makedev() now support ints again. - Issue #23811: Add missing newline to the PyCompileError error message.