[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
> ..
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
[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
> .
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