Open
Description
[config]
list = [
{ key = "value"},
"foo",
]
this way file will be parsed but "foo"
will be ignored: {config: {list: [{key: value}]}}
[config]
list = [
"foo",
{ key = "value"},
]
After parsing toml file above parser will throw an error: IndexError: list index out of range
.
Traceback:
File "/path/to/lib/python3.7/site-packages/toml/decoder.py", line 456, in loads
multibackslash)
File "/path/to/lib/python3.7/site-packages/toml/decoder.py", line 725, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
File "/path/to/lib/python3.7/site-packages/toml/decoder.py", line 802, in load_value
return (self.load_array(v), "array")
File "/path/to/lib/python3.7/site-packages/toml/decoder.py", line 914, in load_array
a[b] = a[b] + ',' + a[b + 1]
IndexError: list index out of range