Closed sbysiak closed 2 years ago
Great catch... fortunately the bug not affecting many (or any?)... For the empty dicts (or in fact all cases where the branch may be left uncreated) to introduce an exception throw... code should crash... leave it is up to the user to make sure the iterables are not empty... I will merge this for now. Thanks Sebastian.
There was a problem when not all branches are created at the same time – in such a situation a shift between corresponding values is introduced, see minimal working example below.
I see two issues:
_fill_branch()
is effecively created: ifvalue
is empty list then branch is created but not filled. Maybe one should split it into_create_branch()
and_fill_branch()
?"FAIL" produces such tree, where array [100,101,...] is assigned to value 10 in "single" instead od 100