Collection of a bunch of named stuff
class bunch(dict): def __init__(self,**kw): dict.__init__(self,kw) self.__dict__.update(kw)
Usage is simple.
>>> o = bunch(a='A', b='B') >>> o {'a': 'A', 'b': 'B'} >>> o.a 'A' >>> o.b 'B' >>>
You can use it as both an object and dict.