Question about apply
jorma kala
jjkk73 at gmail.com
Thu Sep 3 10:54:57 EDT 2009
Hi,
I'm using apply to pass keyword arguments as a dictionary to a funcion at
runtime (which keyword arguments to pass is only known at runtime)
apply is very handy for this, because it takes a dictionary of keyword
arguments directly
def f1(a=None,b=None,c=None):
pass
kw={'a':1}
apply(f1,[],kw)
But I read in the doc that apply is deprecated.
What is the non-deprecated way of doing this?
Many thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090903/b22334e6/attachment.html>
More information about the Python-list
mailing list