mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #24400: Remove inspect.isawaitable().
isawaitable() was added before collections.abc.Awaitable; now, with Awaitable, it is no longer needed (we don't have ishashable() or isiterable() methods in the inspect module either).
This commit is contained in:
parent
86cd7d6b75
commit
a74b5e59af
4 changed files with 2 additions and 42 deletions
|
@ -186,10 +186,6 @@ def iscoroutinefunction(object):
|
|||
return bool((isfunction(object) or ismethod(object)) and
|
||||
object.__code__.co_flags & CO_COROUTINE)
|
||||
|
||||
def isawaitable(object):
|
||||
"""Return true if the object can be used in "await" expression."""
|
||||
return isinstance(object, collections.abc.Awaitable)
|
||||
|
||||
def isgenerator(object):
|
||||
"""Return true if the object is a generator.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue