Augmented Assignement (was: Re: PEP scepticism)

Aahz Maruch aahz at
Mon Jul 2 11:35:35 EDT 2001

In article <naO%6.416271$oc7.58537852 at>,
Rainer Deyke <root at> wrote:
>"Courageous" <jkraska1 at> wrote in message
>news:q0avjto87p59hn7gv28r5cf1c84j2fb8c7 at
>> def f(x):
>>     x = x + (1,2,3)
>> print x
>> ?
>A vast improvement: clear, unambiguous, and correct.  I can safely pass a
>list as an argument and not have it modified behind my back.  Having to
>write "x" twice on the second line is not good, but if it buys me
>correctness, I'll happily pay that price.

In what version of Python can you pass a list to f() here?
                      --- Aahz  <*>  (Copyright 2001 by aahz at

Hugs and backrubs -- I break Rule 6       
Androgynous poly kinky vanilla queer het Pythonista   

"I'm not tense, i'm just terribly, terribly alert"  --unknown

More information about the Python-list mailing list