]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 21 Apr 2015 18:09:23 +0000 (21:09 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 21 Apr 2015 18:09:23 +0000 (21:09 +0300)
Lib/pydoc.py
Misc/NEWS

index b56d385bf7445bf3cae9bc795c9b8bfba163116d..d7396f015d3c4ff5712f973de2d5be40f5eab5cc 100755 (executable)
@@ -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:
index e01aeb2e32ebca0f52b62b9ae12739b1e3bbabb7..4b04488e1f6d8359a1003a70801b6c29fa0c519f 100644 (file)
--- 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.