[Python-Dev] Ordering keyword dicts

Guido van Rossum guido at python.org
Mon May 20 17:35:07 CEST 2013


I think that kills the "let's make all dicts ordered" idea, even for
CPython. I wouldn't want people to start relying on this. The dict type
should be clearly recognizable as the hash table it is.

Making **kwds ordered is still open, but requires careful design and
implementation to avoid slowing down function calls that don't benefit.

--Guido van Rossum (sent from Android phone)
On May 20, 2013 8:25 AM, "fwierzbicki at gmail.com" <fwierzbicki at gmail.com>
wrote:

> On Mon, May 20, 2013 at 6:39 AM, Barry Warsaw <barry at python.org> wrote:
> > Or in other words, if dicts are to be ordered, let's make it an explicit
> > language feature that we can measure compliance against.
> Guaranteeing a dict order would be tough on Jython - today it's nice
> that we can just have a thin wrapper around ConcurrentHashMap. In a
> world with hard ordering guarantees I think we'd need to write our own
> from scratch.
>
> -Frank
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/guido%40python.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130520/160d1402/attachment.html>


More information about the Python-Dev mailing list