[Python-3000] ordered dict for p3k collections?

Rob Crowther weilawei at gmail.com
Tue Sep 25 19:30:37 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 25 Sep 2007 10:18:50 -0700
"Guido van Rossum" <guido at python.org> wrote:

> 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.
>
> 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.

I ran into the issue of wanting an ordered dict recently. I was rather upset at having to redesign my data structures--at first. After reworking them to fit within the confines of an unordered dict, I realized that it actually worked better. 

This isn't to say there should be no such thing, but it really doesn't need to be a part of the standard library, imo. -1 vote for ordered dicts.

Rob
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG+UW9qR5p8HaX4oURAtYmAKCX4xjNTyC7n2ksV/Jb6+ztrtd43ACglRF2
PGUqWUUviyMoWvg9cAO6otk=
=umXa
-----END PGP SIGNATURE-----


More information about the Python-3000 mailing list