3 ms·
“Ability to read in YAML, make changes and write it out again with comments preserved.” How are the comments preserved in the Python representation? Is it some
by twarge 4y ago
“Ability to read in YAML, make changes and write it out again with comments preserved.”
How are the comments preserved in the Python representation? Is it some kind of ordered dict?
- andreareina 4y agoProbably the Map() class actually takes a series of nodes, that could either be comment or a key/value pair (and validates that you don't have duplicate keys). tomlkit does something similar.