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:
Yury Selivanov 2015-06-30 18:19:01 -04:00
parent 86cd7d6b75
commit a74b5e59af
4 changed files with 2 additions and 42 deletions

View file

@ -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.