Augmented Assignment (was: Re: PEP scepticism)

Rainer Deyke root at rainerdeyke.com
Thu Jun 28 21:39:28 EDT 2001


"David Bolen" <db3l at fitlinxx.com> wrote in message
news:uwv5wjepu.fsf at ctwd0143.fitlinxx.com...
> I think that if the operation is phrased from the start as an action
> undertaken by the source object itself and that the source object's
> mutability can affect behavior, that it's not too big of a hurdle.

This dual meaning of augmented assignment makes it dangerous: to get
reliable behavior, you need to be absolutely sure whether or not your object
is mutable before you attempt augmented assignment.  I cringe in horror when
I think about people intentionally using the dual meaning of augmented
assignment.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list