
Oct. 27, 2003
3:58 a.m.
[attribution lost]
Ideally, augmented assignments would also become "rebinding". However, this may have compatibility problems.
[Alex]
Unfortunately yes. It might have been better to define them that way in the first place, but changing them now is dubious.
[Greg]
I'm not so sure. You need an existing binding before an augmented assignment will work, so I don't think there can be any correct existing usages that would be broken by this.
Indeed. If x is neither local not declared global, x+=... is always an error, even if an x at an intermediate level exists, so THAT shouldn't be used as an argument against this. --Guido van Rossum (home page: http://www.python.org/~guido/)