Ordered dict by default
steve at holdenweb.com
Thu Feb 5 05:22:35 EST 2009
bearophileHUGS at lycos.com wrote:
[a somewhat feeble case for ordered dicts]
> Once the default dicts are ordered, it can be possible to add an
> unordereddict to the collections module to be used by programmers when
> max performance or low memory usage is very important :-)
I have no real idea why you think it's desirable to turn this important
feature on its head, but if you've followed the various past threads on
ordered dicts you would know that one of the prime issues every time
this comes up is the inability of the various proponents to agree no ow
dicts should actually be ordered.
> Namespaces and other internal things of Python can keep using the un-
> I don't know what to do regarding Python sets yet. In mathematics sets
> aren't ordered, so they may be kept as they are now.
In mathematics mappings aren't ordered either, and a pure dict is pretty
much a mapping. So leave them alone, they are fine as they are!
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list