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

Raymond Hettinger raymond.hettinger at gmail.com
Fri Dec 15 15:45:27 EST 2017


> On Dec 15, 2017, at 7:53 AM, Guido van Rossum <guido at python.org> wrote:
> 
> Make it so. "Dict keeps insertion order" is the ruling.

On Twitter, someone raised an interesting question.  

Is the guarantee just for 3.7 and later?  Or will the blessing also cover 3.6 where it is already true.

The 3.6 guidance is to use OrderedDict() when ordering is required.  As of now, that guidance seems superfluous and may no longer be a sensible practice.  For example, it would be nice for Eric Smith when he does his 3.6 dataclasses backport to not have to put OrderedDict back in the code.  

Do you still have the keys to the time machine?


Raymond




More information about the Python-Dev mailing list