Keyword Named Args
Diez B. Roggisch
deetsNOSPAM at web.de
Mon Feb 21 06:59:28 EST 2005
> What I can't easily see is any way of passing named keyword arguments
> to the function. Suppose we wanted to pass keyword=param to a function
> - is there any way of doing this ... obviously passing in
> 'keyword=param' as text has entirely the wrong result......
Im not sure if I understand you fully, but if what you are after is how to
pass named parameters analog to positional args, do it as dict:
def foo(name=None):
print name
foo(**{name: "Fuzzy"})
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list