From: Serhiy Storchaka Date: Tue, 21 Apr 2015 18:09:23 +0000 (+0300) Subject: Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. X-Git-Tag: v2.7.10rc1~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8e65755c4080b606972c6fadf74ea29bd1cadf8;p=thirdparty%2FPython%2Fcpython.git Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index b56d385bf744..d7396f015d3c 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1540,7 +1540,7 @@ def resolve(thing, forceload=0): """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 --git a/Misc/NEWS b/Misc/NEWS index e01aeb2e32eb..4b04488e1f6d 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -21,6 +21,8 @@ Core and Builtins 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.