<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 9, 2018 at 7:40 PM, Glenn Linderman <span dir="ltr"><<a href="mailto:v+python@g.nevcal.com" target="_blank">v+python@g.nevcal.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#330033" bgcolor="#FFFFFF"><span class="">
<div class="m_5782980918140675402moz-cite-prefix">On 7/9/2018 6:00 PM, Guido van Rossum
wrote:<br>
</div>
<blockquote type="cite">
This rule is included to simplify the choice for the user between
an<br>
assignment statements and an assignment expression -- there is
no<br>
</blockquote>
<br></span>
"statements" should not be plural in the above line.<span class=""><br></span></div></blockquote><div><br></div><div>Will fix.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#330033" bgcolor="#FFFFFF"><span class="">
<blockquote type="cite">
syntactic position where both are valid.</blockquote>
<br>
<br>
</span><span class=""><blockquote type="cite">An exception to this special case applies
when the target name is the<br>
same as a loop control variable for a comprehension containing it.<br>
This is invalid. This exception exists to rule out edge cases of
the<br>
above scope rules as illustrated by ``[i := i+1 for i in
range(5)]``<br>
or ``[[(j := j) for i in range(5)] for j in range(5)]``. Note
that<br>
this exception also applies to ``[i := 0 for i, j in stuff]``, as
well<br>
as to cases like ``[i+1 for i in i := stuff]``.</blockquote>
<br>
<br></span>
It is unclear whether exactly what is invalid. Is the use of the
target name that is the same as (any of the nested) loop control
variable invalid? I think, from discussions, that that is what is
meant. But this paragraph could be interpreted as meaning the
special case doesn't apply, meaning that the target name would be in
a "sublocal" scope.<span class=""><br></span></div></blockquote><div><br></div><div>Really? If it didn't say "this is invalid" I could see that "exception to the special case" might be interpreted as "the special case doesn't apply". But with "This is invalid" explicitly added I don't see how that interpretation could be valid. Is it clearer if I changed that to "Such code is invalid"? Or perhaps I should move "This is invalid" to the end of the paragraph?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#330033" bgcolor="#FFFFFF"><span class="">
<blockquote type="cite">The ``:=`` operator groups more tightly than
a comma in all syntactic<br>
positions where it is legal, but less tightly than all operators,</blockquote>
<br></span>
If comma is considered an operator, this sentence is inconsistent,
would need to be "all other operators". Even if comma is not
considered an operator, the sentence would be more clear with
"other" added, since ":=" is an operator.<br></div></blockquote></div><br></div><div class="gmail_extra">Makes sense.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>