"Boris Borcic" <bborcic at gmail.com> wrote in message news:e90j6o$fij$1 at sea.gmane.org... > I agree with you (and argued it in "scopes vs augmented assignment vs > sets" > recently) that mutating would be sufficient /if/ the compiler would view > augmented assignment as mutations operators : Mutation is an operation on objects. Binding is an operation on namespaces. The difference between objects and namespaces (and the actions thereupon) is fundamental to Python. Asking the interpreter to view one thing as something else which it isn't can only lead to more confusion. In particular, asking that arithmetic operations on immutable numbers be seen as mutations seems wacky to me. > which it doesn't as far as concerns scopes where a variable > appears as target only of /augmented/ assignments. The interpreter/compiler, as far as I can think, never views binding as mutation, nor should it. The request that it do so makes me wonder whether it might have been a mistake to allow mutable objects in an augmented assignment to choose to implement the associated operation as an in-place mutation. Terry Jan Reedy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4