Issue #6619: Remove duplicate 'isgenerator' function from inspect module.
Thanks Vincent Legoll.
This commit is contained in:
parent
4326ad8f72
commit
9a6d6c93b4
|
@ -240,10 +240,6 @@ def isroutine(object):
|
|||
or ismethod(object)
|
||||
or ismethoddescriptor(object))
|
||||
|
||||
def isgenerator(object):
|
||||
"""Return true if the object is a generator object."""
|
||||
return isinstance(object, types.GeneratorType)
|
||||
|
||||
def isabstract(object):
|
||||
"""Return true if the object is an abstract base class (ABC)."""
|
||||
return isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT
|
||||
|
|
Loading…
Reference in New Issue