You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from treelib import Node, Tree
def create_tree():
tree = Tree()
tree.create_node("root" , "root")
for i in range(2):
id = str(i*100)
tree.create_node(id, id , parent = "root")
for j in range(1, 3):
id = str(i) + str(j*10)
tree.create_node(id, id , parent = str(i *100))
for k in range(1, 3):
id = str(i) + str(j) + str(k)
tree.create_node(id, id , parent = str(i) + str(j*10))
tree.show()
return tree
def break_tree(tree):
tree["020"].identifier = "030"
tree.show()
tree = create_tree()
break_tree(tree)
making use of the
.
and=
in order to modify a node's identifier causes the node to disappearEx:
tree["old_identifier"].identifier = "new_identifier "
the code I used to reproduce the issue:
this outputs:
if you don’t mind I can work on this and please let me know if you have any feedback
The text was updated successfully, but these errors were encountered: