Clarify the ordering of dictionary keys.

This commit is contained in:
Raymond Hettinger 2004-11-25 05:16:19 +00:00
parent 3de9aa40ec
commit 23ce5848aa

View file

@ -1367,8 +1367,10 @@ in the map.
\item[(2)] \versionadded{2.2} \item[(2)] \versionadded{2.2}
\item[(3)] Keys and values are listed in random order. If \item[(3)] Keys and values are listed in an arbitrary order which is
\method{items()}, \method{keys()}, \method{values()}, non-random, varies across Python implementations, and depends on the
dictionary's history of insertions and deletions.
If \method{items()}, \method{keys()}, \method{values()},
\method{iteritems()}, \method{iterkeys()}, and \method{itervalues()} \method{iteritems()}, \method{iterkeys()}, and \method{itervalues()}
are called with no intervening modifications to the dictionary, the are called with no intervening modifications to the dictionary, the
lists will directly correspond. This allows the creation of lists will directly correspond. This allows the creation of