|
|
|
|
|
by tonyg
502 days ago
|
|
Python remembers order, and exposes it in its iterations, but doesn't use it in its equivalence over dictionaries (== semantics). (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...