Based upon One-line Tree in Python, here is a tree-like class where struct is accesible by attributes rather than keys (much more readable IMHO):
from collections import defaultdict
class Tree(defaultdict):
def __init__(self, *va, **kva):
super(Tree, self).__init__(*va, **kva)