variable arguments question

vegetax vegeta.z at gmail.com
Tue Mar 15 02:48:40 EST 2005


if i have a dictionary: 
d = {'a':2,'b':3 }
l = (1,2)

how can i pass it to a generic function that takes variable keywords as
arguments? same thing with variable arguments, i need to pass a list of
arguments to the function

def asd(**kw): print kw
def efg(*arg): print arg

asd(d) 
doesnt work
asd(kw = d) 
doesnt work

efg(l)
doesnt work

i need to pass those as a dictionary and a list,since i dont know ahead of
time if which items would have d and l




More information about the Python-list mailing list