<div dir="ltr">Makes sense.  I doubt anyone is passionate enough to champion such a change.<div><br></div><div style>Merci.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 10:51 PM, Alex Gaynor <span dir="ltr"><<a href="mailto:alex.gaynor@gmail.com" target="_blank">alex.gaynor@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There was a thread about fixing this a while back on python-dev, I don't think it went anywhere though (even though probably everyone agreed it was a good idea).<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Alex</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 8:50 PM, Brantley Harris <span dir="ltr"><<a href="mailto:deadwisdom@gmail.com" target="_blank">deadwisdom@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div>So it evaluates the right, then left to right.  That's strange.</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 10:46 PM, Alex Gaynor <span dir="ltr"><<a href="mailto:alex.gaynor@gmail.com" target="_blank">alex.gaynor@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry, I should have been more precise, first the far right hand side is evaluated, so you get the string 'b' (of course). Then the assignments are evaluated left to right.<div>


<br></div><div>So first:</div>
<div><br></div><div>a['a'] = 'b'</div><div><br></div><div>Then </div><div><div><br></div><div>a[a['a']] = 'b'</div><div><br></div></div><div>Now a['a'] == 'b'</div>

<div><br></div><div>so a['b'] = 'b'.</div><span><font color="#888888"><div><br></div><div>Alex</div></font></span></div><div><div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Mon, Apr 1, 2013 at 8:41 PM, Brantley Harris <span dir="ltr"><<a href="mailto:deadwisdom@gmail.com" target="_blank">deadwisdom@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Okay, then it should be a key error:<div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">> a['a'] = a[a['a']]</span><br>



</div></div><div><font face="arial, sans-serif">KeyError: 'a'</font><br>
</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 10:25 PM, Alex Gaynor <span dir="ltr"><<a href="mailto:alex.gaynor@gmail.com" target="_blank">alex.gaynor@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The assignments are going left to right.<div><br></div><div>Alex</div></div><div class="gmail_extra"><br>




<br><div class="gmail_quote"><div><div>On Mon, Apr 1, 2013 at 8:24 PM, Brantley Harris <span dir="ltr"><<a href="mailto:deadwisdom@gmail.com" target="_blank">deadwisdom@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>> a = {}</div>> a['a'] = a[a['a']] = 'b'<br>
<div>{'a': 'b', 'b': 'b'}<br>
</div><div><br></div><div>What the what?  I would think that should KeyError, but it runs fine.  Someone splain.</div>
</div>
<br></div></div>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>




"The people's good is the highest law." -- Cicero<br>

</font></span></div>
<br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>"The people's good is the highest law." -- Cicero<br>




</div>
</div></div><br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>"The people's good is the highest law." -- Cicero<br>


</div>
</div></div><br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>