

def view(self, node=None, spacer=1):
    'A quick and dirty way to view the nested nature of the tree'
    if (node is None):
        node = self
    for (letter, _node) in node.path.iteritems():
        print('-{}> {} {}'.format(('.' * spacer), letter, (self.NULL_CHAR if _node.is_terminal else '')))
        self.view(node=_node, spacer=(spacer + 2))

dataset/ETHPy150Open christabor/MoAL/MOAL/data_structures/trees/trie.py NaiveTrie.view/original