[Python-checkins] cpython (2.7): Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
serhiy.storchaka
python-checkins at python.org
Tue Apr 21 20:11:46 CEST 2015
https://hg.python.org/cpython/rev/d1b9eb9de8af
changeset: 95752:d1b9eb9de8af
branch: 2.7
parent: 95746:3cf2990d19ab
user: Serhiy Storchaka <storchaka at gmail.com>
date: Tue Apr 21 21:09:23 2015 +0300
summary:
Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
files:
Lib/pydoc.py | 2 +-
Misc/NEWS | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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 --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list