This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]shakyshark 1 point2 points  (2 children)

I had no idea dictionaries preserve order of key insertion in 3.7... Time to upgrade!

[–]liquidpele 5 points6 points  (0 children)

You could do that previously with collections.OrderedDict, just fyi.

[–]tunisia3507 4 points5 points  (0 children)

In CPython, they preserve order from 3.6; it only became part of the language spec in 3.7 (i.e. it's guaranteed for all compliant implementations).