I find myself writing this class often in my python code when I need a quick single use class.
class Struct(object): def __init__( self, **kwargs ): for
There is a python recipe for this (It just updates the instance's dict instead of calling setattr) Recipe 52308
class Bunch(object): def __init__(self, **kwds): self.__dict__.update(kwds)