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

Raymond L. Buvel levub137 at wi.rr.com
Wed Dec 14 08:08:01 EST 2005


mdcb808 at gmail.com wrote:
> I am writing a C extension with python 2.3.5 and need constructs
> similar to python
>    func(*args, **kwds)
> What's a neat way to do that?
> I found pyrex has a __Pyx_GetStarArgs -
> is there something I'm missing from the regular C/API maybe using one
> of the PyArg_Parse.. calls ?
> 
> Thanks,
> M.
> 

It looks like the PyArg_ParseTupleAndKeywords API call is what you are
looking for.  Documentation is

http://python.org/doc/2.4.2/ext/parseTupleAndKeywords.html



More information about the Python-list mailing list