question about dictionary type..

Terry Reedy tjreedy at
Sat Sep 14 17:58:58 CEST 2002

> Interesting is the line "start[key] = start = {}", because first
> "start[key] = {}" is evaluated, then "start = {}" (with "{}" being
> same object as in the first assignment). You can check this with
"dis", as
> I've read in another posting in this newsgroup:

Since this is documented in Ref Manual 6.3

"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."

you can count on this behaviour persisting in future versions.


More information about the Python-list mailing list