Message189460
You've got a point there. What about this patch (but then with proper english grammer)?
BTW. Actually fixing this wart would be possible, but at a significant cost: you'd have to change the implementation of LHS += RHS from:
tmp = LHS
tmp = tmp.__iadd__(RHS)
LHS = tmp
to:
tmp = LHS
LHS = tmp
tmp = tmp.__iadd__(RHS)
LHS = tmp
The odd assignment on the second line would detect that the LHS is immutable in 99+% of use cases before updating the RHS.
My gut feeling is that an implementation of this would have too high a cost (both in runtime performance and in a more complicated compiler), although it would be interesting to actually see a patch. |
|
Date |
User |
Action |
Args |
2013-05-17 15:07:14 | ronaldoussoren | set | recipients:
+ ronaldoussoren, r.david.murray, flox, andy.chugunov |
2013-05-17 15:07:14 | ronaldoussoren | set | messageid: <1368803234.1.0.19175144957.issue17973@psf.upfronthosting.co.za> |
2013-05-17 15:07:14 | ronaldoussoren | link | issue17973 messages |
2013-05-17 15:07:13 | ronaldoussoren | create | |
|