Python C/API - *arg,**kwds variable argumnents

Carsten Haese carsten at uniqsys.com
Wed Dec 14 13:12:48 EST 2005


On Wed, 2005-12-14 at 12:00, mdcb808 at gmail.com wrote:
> essentially I already use PyArg_ParseTupleAndKeywords, but that seems
> to emulate fixed arg list definitions like - 
>    func (x,y,t=0,u=1)

It's unclear what you are actually trying to accomplish. My guess is
that you want to implement a function/method that takes any number of
arbitrarily named keyword arguments. If that is the case, you can simply
use the dictionary that is passed to your C function as the third
argument.

Hope this helps,

Carsten.




More information about the Python-list mailing list