Re: Implementing class methods in C

2005-08-19 Thread nmichaud
> If you implement _test in C, works none of the above. > The only difference I can see is that: > type(_test.func2) > > is for Python implemented function and > type(_test.func2) > > for C implementation > I would really like to know the answer too. > How do you implement some methods in C w

Re: Implementing class methods in C

2005-08-18 Thread nmichaud
Nope, it still doesn't work. Anyway, that's not exactly what i want, since i want func2 to be accessible from all instances of Test() Naveen On Thu, 18 Aug 2005, Jeremy Moles wrote: > I honestly don't know the answer to this and I am entirely guessing > but--does it work without using the new m

Implementing class methods in C

2005-08-18 Thread nmichaud
I am having a problem implementing some methods of a python class in C. The class is defined in python, but I would like to rewrite some methods in c. Here is an example of what I want to do: file _test.c: #include static PyObject * func2(PyObject *self, PyObject *args) { if (self == NULL) {

Implementing class methods in C

2005-08-15 Thread nmichaud
I am having a problem implementing some methods of a python class in C. The class is defined in python, but I would like to rewrite some methods in c. Here is an example of what I want to do: file _test.c: #include static PyObject * func2(PyObject *self, PyObject *args) { if (self == NULL) {