Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

PR 6142 fixes issues 2 and 4. It adds a new opcode END_ASYNC_FOR and therefore 
can't be backported. END_ASYNC_FOR combines a number of other opcodes and 
guaranties using the true StopAsyncIteration. The new opcode is neccessary also 
for detecting an "async for" loop when jump. Besides introducing the new opcode 
the code of an "async for" loop was changed in a way that allowed to disallow 
jumping into an "async for" loop (this is the only part that can be 
backported). The final bytecode is much simpler. The compiler has been cleaned 
up and its code is now much simpler too. I expect also a performance boost, but 
don't know how to benchmark this.

Perhaps only the half of issue 4 (disallowing jumps into an "async for" loop) 
can be solved in 3.7 and 3.6.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33041>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to