Ok, somebody go for it! (Also please refer to my pronouncement in the bug -- I've gotta run.)<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 7, 2012 at 7:12 AM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Nov 8, 2012 at 12:54 AM, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>


> On Wed, Nov 7, 2012 at 4:13 AM, Ned Batchelder <<a href="mailto:ned@nedbatchelder.com">ned@nedbatchelder.com</a>> wrote:<br>
</div><div class="im">>> If the bug report is accurate, CPython and the reference manual have<br>
>> disagreed since Python 2.5, and many of us are now surprised to hear it,<br>
>> which means there can't have been much broken code.<br>
><br>
> Give that it was discussed before and fixed before, I think the intent<br>
> is clear: we should fix the code, not the docs.<br>
<br>
</div>Almost certainly, it was broken in the migration to the AST compiler<br>
and there was no regression test to pick up the change.<br>
<div class="im"><br>
> I haven't looked at the proposed fixes, but I think correctness is<br>
> more important than saving an extra bytecode (OTOH keeping the set of<br>
> opcodes the same trumps both). I can't imagine that this extra opcode<br>
> will be significant in many cases.<br>
<br>
</div>Since you've indicated the implementation is in the wrong here and you<br>
also want to preserve opcode semantics, I think Skip's patch is<br>
correct, but also needs to be applied to dict comprehensions (now we<br>
have them). The extra bytecode is only ROT_TWO, which is one of the<br>
cheapest we have kicking around :)<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
Nick.<br>
<br>
--<br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)<br>
</div>