I find it more convenient to access dict keys as obj.foo instead of obj[\'foo\'], so I wrote this snippet:
obj.foo
obj[\'foo\']
class AttributeDict(dict
No need to write your own as setattr() and getattr() already exist.
The advantage of class objects probably comes into play in class definition and inheritance.