diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-09 00:59:29 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-09 00:59:29 (GMT) |
commit | d8aa0c6eec26cd59711a2df6d482171f1804f2a7 (patch) | |
tree | 2ff1f980f31dbd4d843d835bf282908db1316633 /Lib/inspect.py | |
parent | 29310c47a7e9d0631291f9b40eebcd9f472d66fa (diff) | |
parent | c0215dfbc1156267e3b14145c49195c843cd0721 (diff) | |
download | cpython-d8aa0c6eec26cd59711a2df6d482171f1804f2a7.zip cpython-d8aa0c6eec26cd59711a2df6d482171f1804f2a7.tar.gz cpython-d8aa0c6eec26cd59711a2df6d482171f1804f2a7.tar.bz2 |
Merge 3.5 (issue #28639)
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 4 |
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): |