From a8e65755c4080b606972c6fadf74ea29bd1cadf8 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 21 Apr 2015 21:09:23 +0300 Subject: Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. --- Lib/pydoc.py | 2 +- Misc/NEWS | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index b56d385..d7396f0 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 e01aeb2..4b04488 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. -- cgit v0.12