|
|
|
|
|
by ktpsns
2438 days ago
|
|
Isn't it explicitly discouraged to rely on dict() being ordered? IIRC the Python standard (if it exists) has collections.OrderedDict() in mind to fulfill ordering. I think when CPython introduced ordering, they warned about that. [No references included, happy if somebody provides some] |
|
> Changed in version 3.7: Dictionary order is guaranteed to be insertion order. This behavior was an implementation detail of CPython from 3.6. [0]
[0] https://docs.python.org/3.7/library/stdtypes.html#typesmappi...