diff -r 4d1236b180be Lib/pydoc.py --- a/Lib/pydoc.py Mon Apr 13 23:12:42 2015 -0700 +++ b/Lib/pydoc.py Tue Apr 14 11:00:06 2015 +0300 @@ -1588,7 +1588,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. Use help() to get the interactive help utility. diff -r 4d1236b180be Lib/test/test_pydoc.py --- a/Lib/test/test_pydoc.py Mon Apr 13 23:12:42 2015 -0700 +++ b/Lib/test/test_pydoc.py Tue Apr 14 11:00:06 2015 +0300 @@ -1006,6 +1006,14 @@ class PydocWithMetaClasses(unittest.Test result = output.getvalue().strip() self.assertEqual(expected_text, result) + def test_resolve_false(self): + # Issue #23008: pydoc enum.{,Int}Enum failed + # because bool(enum.Enum) is False. + with captured_stdout() as help_io: + pydoc.help('enum.Enum') + helptext = help_io.getvalue() + self.assertIn('class Enum', helptext) + @reap_threads def test_main():