Showing content from http://mail.python.org/pipermail/python-dev/attachments/20171126/82ef7b9e/attachment.html below:
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Nov 25, 2017 at 4:57 PM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 26 November 2017 at 02:59, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
><br>
> I'd be happy to stop with the conclusion that we're going to rip out some<br>
> confusing syntax rather than trying to generate code for it -- IMO we've<br>
> proved to ourselves that this stuff is too complicated to be useful.<br>
<br>
</span>I'll also note that even if we go through a period of deprecating and<br>
then prohibiting the syntax entirely, we'll still have the option of<br>
bringing support for "yield" in comprehensions back later with<br>
deliberately designed semantics (as happened for "await" in<br>
<a href="https://www.python.org/dev/peps/pep-0530/#await-in-comprehensions" rel="noreferrer" target="_blank">https://www.python.org/dev/<wbr>peps/pep-0530/#await-in-<wbr>comprehensions</a>), as<br>
opposed to the accident-of-implementation semantics they have now.<br>
<br>
It may also turn out that as more asynchronous code is able to switch<br>
to being 3.6+ only, allowing "await" and prohibiting "yield" will<br>
prove to be sufficient for all practical purposes (as even the "yield<br>
from" based spelling is Python-3-only, so it's only code that still<br>
has to support 3.3, 3.4, 3.5, without needing to support 2.7, that<br>
could use "yield from + yield" comprehensions, but wouldn't have the<br>
option of just switching to async+await instead).<br></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">And I'll also note that some style guides recommend using comprehensions only for simple cases. Example:</div><div class="gmail_extra"><a href="https://google.github.io/styleguide/pyguide.html#List_Comprehensions">https://google.github.io/styleguide/pyguide.html#List_Comprehensions</a> -- expand by clicking on the arrow; the "Con" comment is "Complicated list comprehensions or generator expressions can be
hard to read."</div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</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