Ordered dict by default

MRAB google at mrabarnett.plus.com
Fri Feb 6 16:47:41 EST 2009


Cameron Simpson wrote:
> On 05Feb2009 01:47, bearophileHUGS at lycos.com <bearophileHUGS at lycos.com> wrote:
> | [...] But even if the average performance becomes a
> | little worse I think making the default Python dict as ordered is a
> | positive change for Python too, because built-ins are meant to be as
> | flexible as possible, even if they aren't the fastest ones or the less
> | memory hungry ones
[snip]
> I would much rather keep dictionaries as performant as possible, as a
> bare mapping, and add an odict for when order matters.
> 
+1




More information about the Python-list mailing list