Augmented Assignement (was: Re: PEP scepticism)

Guido van Rossum guido at python.org
Fri Jul 6 07:43:00 EDT 2001


Donn Cave <donn at drizzle.com> writes:

> The thing that I like about all this, it's good to hear what
> sounds like a consensus that Python programmers need to have
> some appreciation of the object/reference/binding/namespace
> thing that happens when we assign.  We can't reasonably say
> "don't worry, it will just work", we can't pass it off as an
> esoteric internal detail, you need to get this model from the
> start.  Left to your own devices you might not get it.  If you
> don't, you can't accurately predict what your code will do.
> 
> If augmented assignments confuse a few people, but the
> potential for confusion leads authors and teachers to take
> more pains early on, to firm up these notions before +=
> can lead folks astray, I predict a net gain.

Excellent observation, Don!

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list