-1 index error in certain cases
macabrus opened this issue · 1 comments
macabrus commented
This line throws index error in certain cases.
import tomlkit
doc = tomlkit.parse('''
[a]
[a.b]
b = 0
''')
for label, obj in doc['a'].items():
obj[tomlkit.key(['a', 'b'])] = 1
obj[tomlkit.key(['a', 'c'])] = 2
self._table_keys[-1] != current_body_element[0]
~~~~~~~~~~~~~~~~^^^^
IndexError: list index out of range
am i misusing an API or is the implementation wrong? issue also occurs when using .add() method instead of setitem()
frostming commented
It doesn't throw any error with the latest master branch.