Re: question about tree in python

2009-11-18 Thread Lie Ryan
nospam wrote: How should I write a tree using diconary. I have used a dictonary to make a tree. dictionary tree? root = { 'node_a': { 'node_a_a': 'blah', 'node_a_b': 'foo', 'node_a_c': 'bar', }, 'node_b': { 'node_b_a': 'soo', 'node_b_b': 'fle

question about tree in python

2009-11-18 Thread nospam
How should I write a tree using diconary. I have used a dictonary to make a tree. tree={best:collections.defaultdict(lambda:default)} in a id3 tree. Is there a way to multple values and when then only return on type of values. I tried this apporach but it did not work. class Tree: def _