News for hackers. Stuff that matters.
Re:Comprehensive Python Cheatsheet (2018) by BerislavLopac on Monday February 04, 2019 @09:33AM (#19076598)
More importantly, in Python 3.7 this exception has become the rule, i.e. it was introduced in the language specification
Re:Comprehensive Python Cheatsheet (2018) by dbcurtis on Monday February 04, 2019 @11:19AM (#19077527)
I am personally not a fan of details like this creeping into the language spec. CPython is not the only Python. This kind of spec creates unnecessary challenges for Micropython, for example. And of course there is Cython and others. It makes no sense to me that this should be in the language spec — you are essentially specifying a built in minefield of implementation bugs.
Re:Comprehensive Python Cheatsheet (2018) by joshuamorton on Monday February 04, 2019 @03:25PM (#19080263)
Cpython took this implementation detail from pypy (so it was already going to be the case in the two most used python implementations).

The reason being that the ordered dict ends up being faster than non-ordered, and people will rely on this implementation detail, so they added it to the spec to make that okay.