[Python-ideas] Globalize lonely augmented assignment
Terry Reedy
tjreedy at udel.edu
Sat Jun 12 09:10:11 CEST 2010
On 6/11/2010 9:18 PM, Demur Rumed wrote:
> I believe it would be simpler to learn that variables are _only_ local
> if bound with the assignment operator.
Assignment is NOT NOT NOT an operator. It is a type of statement.
> I view the augmented assignment operators as different beasts.
Your view is one that leads to buggy code. It is wrong in that respect.
An augmented assignment STATEMEMT is both a STATEMENT, not an operator,
and an ASSIGNMENT statement. Misunderstanding this leads to buggy code
and posts on python list "why doesnt my code not work righ?"
-1+ on the proposal as it will lead to confusion and bugs.
Terry Jan Reedy
More information about the Python-ideas
mailing list