To my surprise, this week I wanted to point someone to the fact dictionaries are ordered in Python - and I remember quite clearly when it was “declared so” for Python 3.7 - but this information is not in a formal place in the documents.
In the Data Structures page, when describing about dictionaries, one can see indirect confirmation of dict ordering in the popitem() method and thatr dicts work with reversed from Python 3.8 on.
I then tried looking for a PEP which would follow the new dictionary implementation which yielded ordering “for free” - and that is also not in any PEP.WHat one can find around is the email from Guido, then the BDLF, declaring that “dicts are now ordered”.
Maybe this should just go in as a documentation bug which could be fixed soonish?
And possibly it could even deserve a “posthumous” PEP, gathering the materials which led to the current behavior?
(I apologise for not enriching this post with links, due to time issues) -
Yes, it is indeed there - thank you and sorry for the noise.
(I can perceive how I missed the phrase in the Data Structure docs - but I am still wondered how I missed it in the “what is new” for 3.7, as I had scanned that. Maybe I’ve searched for “dicts” instead of “dict”)