Passing dict-type arg list to 2nd func??

Fernando Pérez fperez528 at yahoo.com
Tue Oct 22 02:48:47 CEST 2002


Bob van der Poel wrote:

> 
> How do I do this?
> 
> def woof(v, **k):
> if v==1:
> foo1(k)
> elif v==2:
> foo2(k)
> else:
> foo3(k)

Call them as foo1(**k), foo2(**k), etc.

Cheers,

f



More information about the Python-list mailing list