Diez B. Roggisch wrote: > AFAIK the order is deterministic as long as you don't alter the dict between > iterations. However, this is an implementation detail.
It's not an implementation detail. It's documented behavior. Thus quoth http://docs.python.org/library/stdtypes.html#mapping-types-dict : """ If items(), keys(), values(), iteritems(), iterkeys(), and itervalues() are called with no intervening modifications to the dictionary, the lists will directly correspond. """ -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list