Re: problems binding a dictionary

2005-12-10 Thread Dody Suria Wijaya
[EMAIL PROTECTED] wrote: > this has to be a very silly thing. > > I have a function foo taking a dictionary as parameters. i.e.: def > foo(**kwargs): pass > when I call foo(param1='blah',param2='bleh',param3='blih') everything > is fine. > but when I do: def foo(**kwargs): > ... pass > ..

Re: problems binding a dictionary

2005-12-10 Thread Sam Pointon
You're not 'exploding' the dict to the param1='blah' etc form - you-re actually passing it in as a single dict object. To solve this, add a ** to the front of a dict you want to explode in a function, just as you'd add a * to explode a sequence. -- http://mail.python.org/mailman/listinfo/python-l

Re: problems binding a dictionary

2005-12-10 Thread vida00
[EMAIL PROTECTED] wrote: > this has to be a very silly thing. > > I have a function foo taking a dictionary as parameters. i.e.: def > foo(**kwargs): pass > when I call foo(param1='blah',param2='bleh',param3='blih') everything > is fine. > but when I do: > >>> def foo(**kwargs): > ... pass > .

problems binding a dictionary

2005-12-10 Thread vida00
this has to be a very silly thing. I have a function foo taking a dictionary as parameters. i.e.: def foo(**kwargs): pass when I call foo(param1='blah',param2='bleh',param3='blih') everything is fine. but when I do: >>> def foo(**kwargs): ... pass ... >>> d=dict(param1='blah',param2='bleh',par