Multiple assignment behaves unexpectedly (was: Help ! newbie problem)

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Fri Dec 26 15:09:22 EST 2003


ferdydurke:
>...     a,b,c = b,a+b,c+1

b is set to a + b.

[...]
>...     a=b
>...     b=a+b
           ^
      This a has a different value now, because of the previous statement.
So this sets b to b + b.

-- 
René Pijlman




More information about the Python-list mailing list