[Python-Dev] Addendum to PEP 530
brett at python.org
Mon Mar 4 15:06:55 EST 2019
Open an issue at https://github.com/python/steering-council/issues if you
want the steering council to consider something.
On Mon, Mar 4, 2019 at 9:38 AM Serhiy Storchaka <storchaka at gmail.com> wrote:
> PEP 530 introduced support for asynchronous comprehensions.
> Comprehensions are implemented as local functions. To make a function
> asynchronous you should to add "async" before "def", and after that you
> can use "async for", "async with" and "await" in a function. But you can
> to do this with comprehensions, since these functions are implicit.
> PEP 530 allows to make these function asynchronous by just using
> asynchronous syntax inside. "async with" can not be used in
> comprehensions, but using "async for" or "await" makes the comprehension
> What PEP 530 missed is that asynchronous comprehensions itself are
> asynchronous constructions which can be used only in asynchronous
> Issue33346  makes an asynchronous comprehension inside a
> comprehension making the outer comprehension asynchronous as well as
> using explicit "async for" or "await". See details on the issue.
> Yury, the author of PEP 530, likes this idea, and there is a ready
> implementation. But making the decision was deferred until a new
> government be stated. Now, after the Steering Council has been elected,
> can it make the decision?
>  https://bugs.python.org/issue33346
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev