[Python-Dev] Dictionary evaluation order (original) (raw)

Finn Bock bckfnn@worldonline.dk
Tue, 26 Nov 2002 12:14:31 +0100


[Gustavo Niemeyer]

I was just looking at the bug

[#448679] Left to right It mentions that code like that {f1():f2(), f3():f4()} Will call these functions in the order f2, f1, f4, f3. What should we do about it? Tim mentions that "When [Tim] asked Guido about that some years ago, he agreed it was a bug.". Is it too late to fix it, or is it still a desirable fix?

[Guido van Rossum]

... What does Jython do?

Jython happens to evaluate in order of f1, f2, f3, f4. An accident, I'm sure, of the way the dictionary constructor is called with a sequence of (key, value, key, value, ...).

regards, finn