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
tuples can be used dict keys. How would you access tuple in your construct?
Also, namedtuple is a convenient structure which can provide values via the attribute access.