7 Nov
2012
7 Nov
'12
9:08 a.m.
On 07.11.12 17:12, Nick Coghlan wrote:
Since you've indicated the implementation is in the wrong here and you also want to preserve opcode semantics, I think Skip's patch is correct, but also needs to be applied to dict comprehensions (now we have them). The extra bytecode is only ROT_TWO, which is one of the cheapest we have kicking around :)
Not only to dict comprehensions, but also to item assignments. It will be weird if a dict comprehension and a plain loop will be inconsistent.