mirror of https://github.com/python/cpython
#4795 inspect.isgeneratorfunction() should return False instead of None
This commit is contained in:
parent
3cda1db67f
commit
8ad09a4f2e
|
@ -161,6 +161,7 @@ def isgeneratorfunction(object):
|
|||
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.
|
||||
|
|
|
@ -100,6 +100,9 @@ Core and Builtins
|
|||
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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue