Python 2.0b1 is released!

Bernhard Reiter breiter at usf.Uni-Osnabrueck.DE
Wed Sep 6 10:44:40 EDT 2000


In article <8p5har$au8$1 at panix6.panix.com>,
	aahz at panix.com (Aahz Maruch) writes:
> In article <8p5cbb$s89$1 at newsserver.rrzn.uni-hannover.de>,
> Bernhard Reiter <breiter at usf.Uni-Osnabrueck.DE> wrote:
>>In article <200009060449.XAA02145 at cj20424-a.reston1.va.home.com>,
>>>
>>>   - Augmented assignment, e.g. x += 1

>>I cannot resist saying that I still consider this an archane "C" -like
>>feature which should be better solved with the replace or macro
>>function of the editor. I always liked the clearness of the normal
>>	x = x + 1
> 
> I think most of us do.  

> long[complicated][expression] = long[complicated][Expression] + 1
> 20MBmutableVariable = 20MBmutableVariable + 1
> 
> In the first case, there's a subtle typo bug; in the second case,
> there's a *huge* copy that has to be done.  
> Yes, macros can
> theoretically handle the first case in powerful editors, and you can use
> methods (e.g. 20MBmutableVariable.add(1)) in the second case, but Guido
> made the decision that adding augmented assignment was the cleaner
> solution in the long run.
> 
> Given the long debate over it and the fact that none of the leading
> developer AFAIK have a serious quibble with it, I'd say it's best to
> drop the issue.  ;-)

Well I did not want to start a new discussion, as I have to admitt
that I do not have the time for it. Python forced me to solve both
problems you stated in different ways and it let to clearness most
of the time:

	c=complicatedExpression
	long[c]=long[c]+1

And using a method to deal with a 20MBmutableVariabel seems to be
right for me, because it might have other practical problems.

	Bernhard
-- 
Professional Service around Free Software                (intevation.net)  
The FreeGIS Project				            (freegis.org)
Association for a Free Informational Infrastructure            (ffii.org)



More information about the Python-list mailing list