Python 3000 idea: reversing the order of chained assignments
Marcin Ciura
marcin.ciura at poczta.NOSPAMonet.pl
Wed Mar 21 18:42:45 EDT 2007
Steven D'Aprano wrote:
>>>>x, y, z = 1, 2, 3
>>>>x = y = z
>>>>x, y, z
>
> (3, 3, 3)
>
> I certainly wouldn't expect to get (2, 3, 3).
Neither would I. I must have expressed myself not clearly enough.
Currently
x = y = z
is roughly equivalent to
x = z
y = z
I propose to change it to
y = z
x = z
Cheers,
Marcin
More information about the Python-list
mailing list