"Boris Borcic" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com