Empty key-value pair in a list is not dumped correctly #364
Labels
component: encoder
Related to serialising in `toml.dump`
syntax: arrays
Related to arrays
syntax: inline table
Related to inline tables
type: bug
A confirmed bug or unintended behavior
Using the latest commit on master (3f637db at this time), here is a minimal example to reproduce the issue I'm encountering:
Note how the
bar
key disappears when dumping the dictionary to TOML, leading to data loss when passing the original data through a dumps/loads round trip.The expected behavior is that
toml.dumps(broken)
returns the following TOML that can then be parsed to retrieve the original data.Another thing to note is that this is only an issue when the key-value pair is part of a list. For instance, the following example behaves as expected:
The text was updated successfully, but these errors were encountered: