[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax
Yury Selivanov
report at bugs.python.org
Mon May 11 03:33:02 CEST 2015
Yury Selivanov added the comment:
New patch is attached.
Nick, I think that all of your feedback should be addressed in this patch.
Major changes:
1. There are two code flags now: CO_COROUTINE and CO_GENBASED_COROUTINE (I'm OK to use another name, see my older comments). CO_COROUTINE is assigned to all 'async def' code objects. CO_GENBASED_COROUTINE is assigned to generator-based coroutines decorated with types.coroutine().
2. tp_await renamed to tp_as_async. (I'm OK to use another name, please see my older comment first) PyAsyncMethods struct holds three slots: am_await, am_aiter, am_anext. Implementing am_exit would be tricky, because of how SETUP_WITH opcode is engineered. I'd really prefer to not to add it.
3. collections.abc.Coroutine.
4. etc (all other feedback from you).
----------
Added file: http://bugs.python.org/file39337/await_05.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24017>
_______________________________________
More information about the Python-bugs-list
mailing list