Peter Hansen wrote: > Definitely not. I believe it's currently guaranteed that the order of > the items in dict.keys() and dict.values() will match (i.e. the index of > any key in its list will be the same as the index of the corresponding > value in its list). This property is almost certainly used in some > code, so it can't be broken without good reason.
As I recall, that guarantee is only if the dict is not modified between retrieving the keys and retrieving the values. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list