[Python-Dev] PEP 203 Augmented Assignment

Thomas Wouters thomas@xs4all.net
Thu, 27 Jul 2000 12:22:24 +0200


On Thu, Jul 27, 2000 at 10:02:49AM +0200, M.-A. Lemburg wrote:
> Guido van Rossum wrote:

> > I should add something about the assumed pseudo thread-safety of a+=b.

> > Simply put:
> > 
> >     a += 1 IS NOT ATOMIC!

> If that's the case, then why do we need augemented assignments
> at all ?
> (I understood the atomicness being the main argument for
> introducing augmented assigns.)

Nah, that was just something that emerged from my implementation, and only
stood up in the face of simple builtin objects. I probably shouldn't have
mentioned this ;-P I can't say anything about Guido's reasons for augmented
assignment, but mine are ease-of-use, ease of use, and the ease of usage. 

And-python-is-all-about-ease-of-use-ly y'rs,
-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!