<div dir="ltr"><div dir="ltr">Open an issue at <a href="https://github.com/python/steering-council/issues">https://github.com/python/steering-council/issues</a> if you want the steering council to consider something.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 4, 2019 at 9:38 AM Serhiy Storchaka <<a href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">PEP 530 introduced support for asynchronous comprehensions.<br>
<br>
Comprehensions are implemented as local functions. To make a function <br>
asynchronous you should to add "async" before "def", and after that you <br>
can use "async for", "async with" and "await" in a function. But you can <br>
to do this with comprehensions, since these functions are implicit.<br>
<br>
PEP 530 allows to make these function asynchronous by just using <br>
asynchronous syntax inside. "async with" can not be used in <br>
comprehensions, but using "async for" or "await" makes the comprehension <br>
asynchronous.<br>
<br>
What PEP 530 missed is that asynchronous comprehensions itself are <br>
asynchronous constructions which can be used only in asynchronous functions.<br>
<br>
Issue33346 [1] makes an asynchronous comprehension inside a <br>
comprehension making the outer comprehension asynchronous as well as <br>
using explicit "async for" or "await". See details on the issue.<br>
<br>
Yury, the author of PEP 530, likes this idea, and there is a ready <br>
implementation. But making the decision was deferred until a new <br>
government be stated. Now, after the Steering Council has been elected, <br>
can it make the decision?<br>
<br>
[1] <a href="https://bugs.python.org/issue33346" rel="noreferrer" target="_blank">https://bugs.python.org/issue33346</a><br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/brett%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/brett%40python.org</a><br>
</blockquote></div>