[Python-3000] ordered dict for p3k collections?

Guido van Rossum guido at python.org
Tue Sep 25 19:18:50 CEST 2007


On 9/25/07, Mark Summerfield <mark at qtrac.eu> wrote:
> I can understand your personal preference for dict, although mine is for
> sorteddict---but IMO Python should provide both since both are
> legitimate in appropriate contexts.

Careful what you wish for.

One of Python's strengths is that there is *not* a lot of choice in
data type implementations (unless you go to relatively obscure places
like the collections module or 3rd party extensions). This saves
programmers time because they don't have to decide what data type
implementation to use in cases where it doesn't matter (and that's the
majority of cases).

This is not a rationalization after the fact: it has always been a
specific design goal in Python to minimize the number of decisions
that a programmer must make up front. This goal also minimizes the
danger that the *wrong* decision is made, as the standard data types
are pretty darn good for almost any purpose.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list