diff --git a/libsaria/trees.py b/libsaria/trees.py index f4349888..24337bd9 100644 --- a/libsaria/trees.py +++ b/libsaria/trees.py @@ -47,6 +47,13 @@ class Tree(dict): if len(path) > 1: child.insert(path[1:]) + def lookup(self, path): + print self.keys(), path + child = self[path[0]] + if len(path) > 1: + return child.lookup(path[1:]) + return child + class DLTree(Tree): def __init__(self):