<div dir="ltr"><div>As anticippated, after a final round of feedback I am hereby accepting PEP 572, Assignment Expressions: <a href="https://www.python.org/dev/peps/pep-0572/" target="_blank">https://www.python.org/dev/<wbr>peps/pep-0572/</a><br></div><div><br></div><div>Thanks to everyone who participated in the discussion or sent a PR.</div><div><br></div><div>Below is a list of changes since the last post (<a href="https://mail.python.org/pipermail/python-dev/2018-July/154557.html" rel="nofollow" target="_blank">https://mail.python.org/<wbr>pipermail/python-dev/2018-<wbr>July/154557.html</a>) -- they are mostly cosmetic so I won't post the doc again, but if you want to go over them in detail, here's the history of the file on GitHub: <a href="https://github.com/python/peps/commits/master/pep-0572.rst" target="_blank">https://github.com/python/<wbr>peps/commits/master/pep-0572.<wbr>rst</a>, and here's a diff since the last posting: <a href="https://github.com/python/peps/compare/26e6f61f...master" target="_blank">https://github.com/python/<wbr>peps/compare/26e6f61f...master</a> (sadly it's repo-wide -- you can click on Files changed and then navigate to pep-0572.rst).</div><div><ul>
<li>Tweaked the example at line 95-100 to use <code>result = ...</code> rather than <code>return ...</code> so as to make a different rewrite less feasible</li>
<li>Replaced the weak "2-arg iter" example with Giampaolo Roloda's <code>while chunk := file.read(8192): process(chunk)</code></li>
<li><b>Added prohibition of unparenthesized assignment expressions in annotations and lambdas</b></li><li>Clarified that <code>TargetScopeError</code> is a <i>new</i> subclass of <code>SyntaxError</code></li>
<li>Clarified the text forbidding assignment to comprehension loop control variables</li>
<li>Clarified that the prohibition on <code>:=</code> with annotation applies to <i>inline</i> annotation (i.e. they cannot be syntactically combined in the same expression)</li>
<li>Added conditional expressions to the things <code>:=</code> binds less tightly than</li>
<li>Dropped section "This could be used to create ugly code"</li>
<li>Clarified the example in Appendix C</li>
</ul>Now on to the implementation work! (Maybe I'll sprint on this at the core-dev sprint in September.)<br></div><div><br>-- <br><div class="m_1068074662224319104gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>