Python 3000 idea: reversing the order of chained assignments

John Nagle nagle at
Thu Mar 22 01:17:07 CET 2007

Marcin Ciura wrote:

> 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

Actually, it is equivalent to

	y = z
	x = y

 > Python performs chained assignments backwards compared to other languages...

     C and C++ are both right-to-left, like Python.  In Pascal,
Modula I/II/III, and Ada, assignments are not expressions, so it's not
a meaningful question there.

				John Nagle

More information about the Python-list mailing list