current_subtree = tree[1]
for i in range(level):
current_subtree = current_subtree[-1][1]
- current_subtree.append((parts[-1], []))
- elif level == save_level:
- current_subtree.append((parts[-1], []))
elif level > save_level:
assert level - save_level == 1
current_subtree = current_subtree[-1][1]
- current_subtree.append((parts[-1], []))
+ #else: # level == save_level:
+ current_subtree.append((parts[-1], []))
save_level = level
except StopIteration:
pass