I saw that in 2.4, although it's not clear how I can make it work. the argument char *format and char *keywords[] are fixed there. Does anyone have a working example? I'm just wondering if there are plans or already an API/C in python core similar to __Pyx_GetStarArgs. It seems like a very usefull and common thing for extensions writer. pyrex actually does a very neat job, looking at its output is really instructive. How widespread is this solution? I started my extensions long ago before realizing such solution existed, and rather stick to a regular python API, understood this is what pyrex generates -
M. Raymond L. Buvel wrote: > [EMAIL PROTECTED] 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 -- http://mail.python.org/mailman/listinfo/python-list