PATCH: Augmented assignment

Russell Wallace rwallace at esatclear.ie
Tue Jun 13 19:28:35 EDT 2000


> invalid.address at 127.0.0.1 (David) wrote:
> 
> > On Fri, 9 Jun 2000 16:39:38 +0200, Thomas Wouters <thomas at xs4all.net>
> > wrote:
> >
> > >As promised, here is my patch to add augmented assignment (+=, -= and
> > >family) to Python. It's still Work In Progress, and probably requires a
> > >rewrite of some magnitude before Guido will accept it.
> >
> >
> > Why would the Python community want this?  It obfuscates code, in as much
> > that newbies aren't likely to intuite what the symbols mean.

I disagree.  Indeed, I put it to you that

	foo += 1

is *more* intuitive than

	foo = foo + 1

It's not a huge issue, but it makes things that little bit simpler and
more convenient; and "simpler and more convenient" is Python's raison
d'etre, IMO.

-- 
"To summarize the summary of the summary: people are a problem."
Russell Wallace
mailto:rwallace at esatclear.ie
http://www.esatclear.ie/~rwallace



More information about the Python-list mailing list