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

2005-12-14 Thread [EMAIL PROTECTED]
thanks, I get it now. -- http://mail.python.org/mailman/listinfo/python-list

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

2005-12-14 Thread Carsten Haese
On Wed, 2005-12-14 at 12:00, [EMAIL PROTECTED] 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 fu

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

2005-12-14 Thread Fredrik Lundh
[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? static PyObject* myfunc(PyObject* self, PyObject* args, PyObject* kw) { ... args is a tuple, kw is a dictionary ... } stati

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

2005-12-14 Thread [EMAIL PROTECTED]
essentially I already use PyArg_ParseTupleAndKeywords, but that seems to emulate fixed arg list definitions like - func (x,y,t=0,u=1) -- http://mail.python.org/mailman/listinfo/python-list

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

2005-12-14 Thread [EMAIL PROTECTED]
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

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

2005-12-14 Thread Raymond L. Buvel
[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_P

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

2005-12-14 Thread [EMAIL PROTECTED]
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. -- http://