The Order Of Dictionary Entries
Tim Daneliuk
tundra at tundraware.com
Wed Mar 10 06:11:26 EST 2004
I am aware that dictionary order is not guaranteed. But I ran into
something puzzling today. I filled a dictionary dynamically as a
program ran. Up to a certain point, the key order was the order
in which things were added. However, at some point, the dictionary
appeared to reorder its contents in some non-deterministic way - in
fact, it looked like it was putting all the uppercase keys first,
followed by lowercase keys.
I'm just curious, just what _is_ the approach used for ordering
dictionary keys?
(This was confirmed on both Unix and Win32, BTW).
--
----------------------------------------------------------------------------
Tim Daneliuk tundra at tundraware.com
PGP Key: http://www.tundraware.com/PGP/
More information about the Python-list
mailing list