I\'ve started to use constructs like these:
class DictObj(object): def __init__(self): self.d = {} def __getattr__(self, m): return s
The one major disadvantage of using something like your DictObj is you either have to limit allowable keys or you can't have methods on your DictObj such as .keys(), .values(), .items(), etc.
.keys()
.values()
.items()