diff options
author | Raymond Hettinger <python@rcn.com> | 2016-09-09 22:58:00 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-09-09 22:58:00 (GMT) |
commit | f1024f74250d534d16a9970e5093b3b4e693b398 (patch) | |
tree | 84f2c7e4dbdc45b8236b641efdfbdf3db5c494bb /Lib/asyncio/coroutines.py | |
parent | 3ceb573a720b8b9c9148135c64ba966fa37e3a92 (diff) | |
parent | 87dc4d61890b4ed1c74b1f5e7256b3aa2080a499 (diff) | |
download | cpython-f1024f74250d534d16a9970e5093b3b4e693b398.zip cpython-f1024f74250d534d16a9970e5093b3b4e693b398.tar.gz cpython-f1024f74250d534d16a9970e5093b3b4e693b398.tar.bz2 |
merge
Diffstat (limited to 'Lib/asyncio/coroutines.py')
-rw-r--r-- | Lib/asyncio/coroutines.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py index 9c338b0..d92f67d 100644 --- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -204,8 +204,8 @@ def coroutine(func): @functools.wraps(func) def coro(*args, **kw): res = func(*args, **kw) - if isinstance(res, futures.Future) or inspect.isgenerator(res) or \ - isinstance(res, CoroWrapper): + if (futures.isfuture(res) or inspect.isgenerator(res) or + isinstance(res, CoroWrapper)): res = yield from res elif _AwaitableABC is not None: # If 'func' returns an Awaitable (new in 3.5) we |