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 <rep...@bugs.python.org>
<http://bugs.python.org/issue24017>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to