Dictionary order (Is it consistent up to py3.3 unless using -R or PYTHONHASHSEED is set)

Ian Kelly ian.g.kelly at gmail.com
Sun May 28 11:58:47 EDT 2017


On May 28, 2017 8:23 AM, "Jon Ribbens" <jon+usenet at unequivocal.eu> wrote:
> On 2017-05-28, Steve D'Aprano <steve+python at pearwood.info> wrote:
>> What exactly did you think I got wrong?
>
> 3.6 does preserve the dict order. It isn't a guarantee so may change
> in future versions, but it is what 3.6 actually does.

No, it's what CPython 3.6 actually does. There is no guarantee that Jython
3.6 or PyPy 3.6 will do the same, so it's inaccurate to talk about this as
the generalized behavior of "3.6". There is not even any guarantee that
this won't change in CPython 3.6.2 (though it seems unlikely).



More information about the Python-list mailing list