Clarify whether `tomllib` preserves table key order from input
Discussions on Python.org
Clarify whether `tomllib` preserves table key order from input
Currently the tomllib documentation doesn’t say anything about dict key order. FWIU TOML does not guarantee any particular order: Key/value pairs within tables are not guaranteed to be in any specific order. (from TOML: English v1.1.0) However, neither does JSON, yet the json documentation specifies that the order is preserved: Note: This module’s encoders and decoders preserve input and output order by default. Order is only lost if the underlying containers are unordered. I’m wondering...
0 comments
No comments yet.