llimllib / pymag-trees

Code from the article "Drawing Good-looking Trees" in Python Magazine
http://billmill.org/pymag-trees/
Do What The F*ck You Want To Public License
190 stars 33 forks source link

code error at listing 3 #11

Closed runfengwang closed 1 year ago

runfengwang commented 1 year ago

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)

llimllib commented 1 year ago

Thanks!