Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if matches is None:
- matches = []
- parents = self.tree.keys()
- if ttype in self.ttypes and ttype not in matches:
- matches.append(ttype)
- for node in parents:
- if ttype == node:
- #matches.append(node)
- for child in self.tree[node]:
- self.find_the_node(child, matches)
- if child not in parents:
- matches.append(child)
- # else:
- # for child in self.tree[node]:
- # if ttype == child and ttype not in matches:
- # matches.append(child)
- return matches
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement