[Python-Dev] set iteration order

Hagen Fürstenau hagen at zhuliguan.net
Sun Feb 27 00:44:17 CET 2011


> Code with any dependence on the iteration order of unordered collections
> (other than the guarantee that d.keys() and d.values() match at any
> given time as long as d is unchanged) is buggy.

It's not a matter of dependence on iteration order, but of
reproducibility (in my case there were minor numerical differences due
to different iteration orders). I think we also warn about changes in
pseudorandom number sequences, although you could argue that no code
should depend on specific pseudorandom numbers.

Cheers,
Hagen



More information about the Python-Dev mailing list