cpython: b7b73029c825 (original) (raw)

Mercurial > cpython

changeset 96410:b7b73029c825 3.4

Issue 24004: Support Awaitables (pep 492) in @asyncio.coroutine decorator

Yury Selivanov yselivanov@sprymix.com
date Sat, 30 May 2015 21:02:12 -0400
parents 943fa0e8b6a4
children d1959cafc68c 0708aabefb55
files Lib/asyncio/coroutines.py
diffstat 1 files changed, 13 insertions(+), 2 deletions(-)[+] [-] Lib/asyncio/coroutines.py 15

line wrap: on

line diff

--- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -54,9 +54,10 @@ else: inspect.CO_COROUTINE) try:

except ImportError:

Check for CPython issue #21209

@@ -192,6 +193,16 @@ def coroutine(func): res = func(*args, **kw) if isinstance(res, futures.Future) or inspect.isgenerator(res): res = yield from res

if not _DEBUG: