[Python-Dev] Guarantee ordered dict literals in v3.7?

Guido van Rossum guido at python.org
Wed Nov 8 00:45:05 EST 2017

It seems there must be at least two threads for each topic worth discussing
at all. Therefore I feel compelled to point to
where I state my own conclusion about dict order.

I know Paul Sokolovsky does not claim to speak for MicroPython, but I think
he had better shut up or he's nevertheless going to damage its reputation
beyond repair. I note that micropython.org claims "MicroPython aims to be
as compatible with normal Python as possible to allow you to transfer code
with ease from the desktop to a microcontroller or embedded system." To me
this implies that it is entirely up to the MicroPython project to decide
what they'll do about the order of dict elements -- they can keep doing
what they are doing, or choose a new dict implementation that satisfies
their space and performance needs while also preserving order, or give
developer a compile-time choice, or give users a choice at startup time, or
something else I haven't thought of yet. Any of those options is better
than continuing the flamewar that Paul is waging.

Finally: the dict type should not be endowed with other parts of the
OrderedDict API, not should other API changes to dict be considered.

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171107/f4334682/attachment-0001.html>

More information about the Python-Dev mailing list