> This is a good time to mention that even though from a semantic perspective sets and dictionaries do not carry information about the ordering of their elements.
Except they do in Python. It is extremely useful, surprisingly often.
Except they do in Python. It is extremely useful, surprisingly often.
(ETA: What are you quoting there? I don't think that text appears on the Preserves site) (ETA2: Ah, it's the tutorial. Cool)
Plain dict maintains insertion order but equality checks only check that the key/value pairs are the same. [2] [3]
[1] https://docs.python.org/3/library/collections.html#:~:text=e...
[2] https://docs.python.org/3/library/stdtypes.html#:~:text=dict...
[3] https://docs.python.org/3/library/stdtypes.html#:~:text=dict...