summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-09 00:59:57 (GMT)
committerYury Selivanov <yury@magic.io>2016-11-09 00:59:57 (GMT)
commit6cb819c171d8511651ed8c0cb82130e841b5dde7 (patch)
tree620a55ce4de000c22ecd6cbf7a417522a17265d7
parent9a2ffbd47cf32f228384d80e07e340f80a31a768 (diff)
parentd8aa0c6eec26cd59711a2df6d482171f1804f2a7 (diff)
downloadcpython-6cb819c171d8511651ed8c0cb82130e841b5dde7.zip
cpython-6cb819c171d8511651ed8c0cb82130e841b5dde7.tar.gz
cpython-6cb819c171d8511651ed8c0cb82130e841b5dde7.tar.bz2
Merge 3.6 (issue #28639)
-rw-r--r--Lib/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index f01dd1d..6640375 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -219,10 +219,10 @@ def iscoroutine(object):
return isinstance(object, types.CoroutineType)
def isawaitable(object):
- """Return true is object can be passed to an ``await`` expression."""
+ """Return true if object can be passed to an ``await`` expression."""
return (isinstance(object, types.CoroutineType) or
isinstance(object, types.GeneratorType) and
- object.gi_code.co_flags & CO_ITERABLE_COROUTINE or
+ bool(object.gi_code.co_flags & CO_ITERABLE_COROUTINE) or
isinstance(object, collections.abc.Awaitable))
def istraceback(object):