summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9d9a15d)
It is not permitted (in Python3) to modify a dictionary like this,
while iterating over keys(). We have to make a list of the keys,
copying them.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
return 0
def delempty(n):
"Delete nodes that have no leafnode children"
return 0
def delempty(n):
"Delete nodes that have no leafnode children"
- for i in n.children.keys():
+ for i in list(n.children.keys()):
delempty(n.children[i])
if not live(n.children[i]):
del n.children[i]
delempty(n.children[i])
if not live(n.children[i]):
del n.children[i]