Since when builtin dict preserve key order?

Marko Rauhamaa marko at pacujo.net
Sat Mar 24 07:48:43 EDT 2018


Chris Angelico <rosuav at gmail.com>:

> On Sat, Mar 24, 2018 at 7:48 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> Is that part of the Python Language Specification? If not, it
>> shouldn't be exploited in application programs.
>
> Yes, it is; but the language spec wasn't locked in quite as soon as
> the functionality was. So you may find that CPython 3.6 preserves
> order more than the language requires. Starting with 3.7 (I believe),
> the language spec is significantly tighter.

I take it, then, that the Language Specification follows CPython's
version numbering. I wonder how other Python implementations declare
their standards compliance.


Marko



More information about the Python-list mailing list