mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Issue #6619: Remove duplicate 'isgenerator' function from inspect module.
Thanks Vincent Legoll.
This commit is contained in:
parent
4326ad8f72
commit
9a6d6c93b4
2 changed files with 1 additions and 4 deletions
|
@ -240,10 +240,6 @@ def isroutine(object):
|
||||||
or ismethod(object)
|
or ismethod(object)
|
||||||
or ismethoddescriptor(object))
|
or ismethoddescriptor(object))
|
||||||
|
|
||||||
def isgenerator(object):
|
|
||||||
"""Return true if the object is a generator object."""
|
|
||||||
return isinstance(object, types.GeneratorType)
|
|
||||||
|
|
||||||
def isabstract(object):
|
def isabstract(object):
|
||||||
"""Return true if the object is an abstract base class (ABC)."""
|
"""Return true if the object is an abstract base class (ABC)."""
|
||||||
return isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT
|
return isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT
|
||||||
|
|
|
@ -425,6 +425,7 @@ Inyeol Lee
|
||||||
Thomas Lee
|
Thomas Lee
|
||||||
Christopher Lee
|
Christopher Lee
|
||||||
Luc Lefebvre
|
Luc Lefebvre
|
||||||
|
Vincent Legoll
|
||||||
Kip Lehman
|
Kip Lehman
|
||||||
Joerg Lehmann
|
Joerg Lehmann
|
||||||
Luke Kenneth Casson Leighton
|
Luke Kenneth Casson Leighton
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue