Remove value from tree displaying

Displaying a tree should not use the old tree.value variable.  This
variable doesn't exist anymore.
This commit is contained in:
Bryan Schumaker 2010-11-09 23:21:57 -05:00
parent efa680af19
commit 946e6b19da
1 changed files with 3 additions and 3 deletions

View File

@ -12,13 +12,13 @@ class Tree(dict):
count += 1
return count
def __disp__(self, level):
return "%s (%s)", (child, self[child].value)
def __disp__(self, child, level):
return "%s", child
def disp(self, level = 0):
for child in self:
space = " " * level
fmt, vals = self.__disp__(level)
fmt, vals = self.__disp__(child, level)
print space, fmt % vals
self[child].disp(level + 1)