|
|
|
|
|
by ganduG
3570 days ago
|
|
Because this is an implementation detail. The language spec doesn't enforce this. The real reason they did this was because of the performance gains from the approach - the ordering is just a nice side effect. Its an idea originally from PyPy afaik. `OrderedDict` is now just a thin wrapper around `dict`. i.e. if you want your code to be portable among different Python implementations then you should still use `OrderedDict`. |
|
No, the idea is from Raymond Hettinger on the Python-Dev ML back in 2012: https://mail.python.org/pipermail/python-dev/2012-December/1...
PyPy were the first to bother actually implementing it.