marko at pacujo.net
Sat Mar 8 22:21:34 CET 2014
Mark Lawrence <breamoreboy at yahoo.co.uk>:
> I believe that there are advantages to leaving specialist data
> structures on pypi or other sites, plus it means Python in a Nutshell
> can still fit in your pocket and not a 40 ton articulated lorry,
> unlike the Java equivalent.
An ordered map is a foundational data structure as opposed to, say, a
priority queue, let alone something like urllib2.
If I had to choose between a hash table and AVL (or RB) tree in the
standard library, it would definitely have to be the latter. It is more
generally usable, has fewer corner cases and probably has an equal
performance even in hash tables' sweet spot.
More information about the Python-list