[Python-checkins] cpython (merge 3.6 -> default): Merge 3.6 (issue #28639)

yury.selivanov python-checkins at python.org
Tue Nov 8 20:00:12 EST 2016


https://hg.python.org/cpython/rev/8e3d359cc73b
changeset:   105003:8e3d359cc73b
parent:      105000:6f51b495656c
parent:      105002:6540adb8722a
user:        Yury Selivanov <yury at magic.io>
date:        Tue Nov 08 19:59:57 2016 -0500
summary:
  Merge 3.6 (issue #28639)

files:
  Lib/inspect.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -219,10 +219,10 @@
     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):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list