Question about apply
python at mrabarnett.plus.com
Thu Sep 3 17:13:22 CEST 2009
jorma kala wrote:
> 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):
> But I read in the doc that apply is deprecated.
> What is the non-deprecated way of doing this?
To pass a list as arguments use:
To pass a dict as keyword arguments use:
More information about the Python-list