r68112 - in python/trunk: Lib/inspect.py Misc/NEWS
Author: benjamin.peterson Date: Thu Jan 1 00:48:39 2009 New Revision: 68112 Log: #4795 inspect.isgeneratorfunction() should return False instead of None Modified: python/trunk/Lib/inspect.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/inspect.py ============================================================================== --- python/trunk/Lib/inspect.py (original) +++ python/trunk/Lib/inspect.py Thu Jan 1 00:48:39 2009 @@ -161,6 +161,7 @@ if (isfunction(object) or ismethod(object)) and \ object.func_code.co_flags & CO_GENERATOR: return True + return False def isgenerator(object): """Return true if the object is a generator. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Jan 1 00:48:39 2009 @@ -100,6 +100,9 @@ Library ------- +- Issue #4795: inspect.isgeneratorfunction() returns False instead of None when + the function is not a generator. + - Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
participants (1)
-
benjamin.peterson