Python 3000 idea: reversing the order of chained assignments

Ziga Seilnacht ziga.seilnacht at gmail.com
Thu Mar 22 12:29:00 EDT 2007


John Nagle wrote:
>
>     That's fascinating.  Is that a documented feature of the language,
> or a quirk of the CPython interpreter?
>
Its a documented feature of the language. From the Reference Manual:

"An assignment statement evaluates the expression list (remember that
this can be a single expression or a comma-separated list, the latter
yielding a tuple) and assigns the single resulting object to each of
the target lists, from left to right."

See: http://docs.python.org/ref/assignment.html

Ziga





More information about the Python-list mailing list