June 2, 2011
6:47 a.m.
Steven D'Aprano wrote:
Carl M. Johnson wrote:
Agreed, sure, we have to treat the LHS of = as a local. But += is fundamentally different.
No it's not. It is fundamentally the same. Augmented assignment in Python *is* assignment, equivalent to x = x.__iadd__(other).
Or x = x.__add__(other) if no __iadd__ exists for the object. ~Ethan~