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

I think this can be fixed simpler. Currently a comprehension become 
asynchronous in two cases:

1. Explicitly, when it contains 'async for'. This is visible at AST level.

2. Implicitly, when any of inner expressions contains 'await'.

But asynchronous comprehensions should behave the same way as 'await'. I think 
that a comprehension should be made implicitly asynchronous if any of inner 
expressions contains explicit or implicit asynchronous comprehension. This is 
implemented in PR 6766.

----------
nosy: +gvanrossum, serhiy.storchaka

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

Reply via email to