yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #01646
Re: physParamsAttr -> **physParamsAttr (?)
> Vaclav,
> What happened with physParamsAttr in the python function like
> utils.sphere or utils.box?
> Does ** before physParamsAttr means that the variable is deprecated?
> my scripts fail now with:
**kw means that reamining arguments will be converted to dictionary.
Therefore, if you had something like args={'arg1':value1,'arg2':value2}
before, you should say
utils.box(..., arg1=value1,arg2=value2)
or, if you are lazy, pass the dictionary but expand it to the arguments
by saying utils.box(...,**args).
(BTW, single * expands tuple to sequence of unnamed arguments in python,
so that f(1,2,3) and args=(1,2,3); f(*args) are the same).
HTH, Vaclav
References