ok, so that is simply a wrapper of a dict and has nothing to do with parameter passing and it can be used anyway within the receiving function(or basically anyway I want to say x.key rather than x[key]).
def f(**kwargs): x = Bunch(kwargs) x.some_key_as_attribute = something Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > just curious, since python don't care what object is being passing > > around and the receiving function has to 'decode' it(be it tuple or > > dict or whatever). What is the advantage of dummy class ? > > The convenience of the attribute notation. > > For the record, my favorite variation is as follows: > > class Bunch(dict): > def __init__(self, *args, **kwds): > dict.__init__(self, *args, **kwds) > self.__dict__ = self > > -- > Robert Kern > [EMAIL PROTECTED] > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list