> Wouldn't it be nice if this would work: > > d = {'x': 1} > print d.x > >i.e. every entry in a dictionary is also an attribute of the >dictionary itself. class AttributeDict (UserDict): __getattr__ = UserDict.__getitem__ Daniel