Showing content from http://mail.python.org/pipermail/python-dev/attachments/20171122/501e9d42/attachment.html below:
<div dir="ltr">On 22 November 2017 at 17:24, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 22 Nov 2017 17:08:14 +0100<br>
<span class="">Ivan Levkivskyi <<a href="mailto:levkivskyi@gmail.com">levkivskyi@gmail.com</a>> wrote:<br>
> On 22 November 2017 at 16:56, Yury Selivanov <<a href="mailto:yselivanov.ml@gmail.com">yselivanov.ml@gmail.com</a>><br>
> wrote:<br>
><br>
> > On Wed, Nov 22, 2017 at 10:10 AM, Ivan Levkivskyi <<a href="mailto:levkivskyi@gmail.com">levkivskyi@gmail.com</a>><br>
> > wrote:<br>
> > > On 22 November 2017 at 15:47, Paul Moore <<a href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>> wrote:<br>
> > [...]<br>
> > I'm all for prohibiting using 'yield' expression in generator<br>
> > expressions or comprehensions. The semantics is way to hard to<br>
> > understand and hence be of any value.<br>
> ><br>
> > Making 'await' a SyntaxError is absolutely not an option. Async<br>
> > generator expressions are a shorthand syntax for defining asynchronous<br>
> > generators (PEP 525), and it's already being used in the wild.<br>
> ><br>
><br>
> OK, makes sense, so it looks like we may have the following plan:<br>
><br>
> - fix `yield` in comprehensions<br>
> - update PEP 530 and docs re generator expressions vs comprehensions<br>
> - make `yield` in generator expressions a SyntaxError<br>
<br>
</span>Given a comprehension (e.g. list comprehension) is expected to work<br>
nominally as `constructor(generator expression)`<br></blockquote><div><br></div><div>As Yury just explained, these two are not equivalent if there is an `await` in the comprehension/generator expression.</div><div><br></div><div>--</div><div>Ivan</div><div><br></div><div><br></div></div></div></div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4