llimllib/pymag-trees

code error at listing 3

Closed this issue · 1 comments

There is a code error at listing3.py
nexts = [0] * maximum_depth_of_tree

def minimum_ws(tree, depth=0):
tree.x = nexts[depth]
tree.y = depth
nexts[depth] += 1
for c in tree.children:
minimum_ws(tree, c) <-- I think this should be some typo error, It should be minimum_ws(c, depth+1)

Thanks!