Showing content from http://mail.python.org/pipermail/python-dev/attachments/20171123/a17c0ba8/attachment.html below:
<div dir="ltr">On 23 November 2017 at 12:38, Ivan Levkivskyi <span dir="ltr"><<a href="mailto:levkivskyi@gmail.com" target="_blank">levkivskyi@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-">On 23 November 2017 at 11:55, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On 23 November 2017 at 18:11, Greg Ewing <span dir="ltr"><<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</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-m_1537076896519405998m_5494196750324926748gmail-">Ivan Levkivskyi wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
"People sometimes want to refactor for-loops containing `yield` into a comprehension but that doesn't work (particularly because of the hidden function scope) - lets make it a SyntaxError"<br>
</blockquote>
<br></span>
Personally I'd be fine with removing the implicit function<br>
scope from comprehensions and allowing yield in them, since<br>
the semantics of that are clear.<br></blockquote><div><br></div></span><div>People keep saying this, but seriously, those semantics aren't clear at all once you actually start trying to implement it.</div><div><br></div></div></div></div></blockquote><div><br></div></span><div>If Serhiy will implement his idea (emitting for-loop bytecode inside a try-finally), then I see no problems accepting it as a fix.</div></div></div></div></blockquote><div><br></div><div>Also I think it makes sense to keep discussion in one place, i.e. either here xor at <a href="https://bugs.python.org/issue10544">https://bugs.python.org/issue10544</a><br></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