John O'Hagan <resea...@johnohagan.com>: > Same object, just a different name - but a different result. I get > why, but still find that odd.
The general principle is stated in the language specification: <URL: http://docs.python.org/3.2/reference/simple_stmts.html #augmented-assignment-statements>: Also, when possible, the actual operation is performed in-place, meaning that rather than creating a new object and assigning that to the target, the old object is modified instead. [...] with the exception of the possible in-place behavior, the binary operation performed by augmented assignment [x += y] is the same as the normal binary operations [x = x + y]. We should call += "dual-use technology." Marko -- https://mail.python.org/mailman/listinfo/python-list