[Cython] Accessing C attributes from Python functions in the interpreter

Stefan Behnel stefan_ml at behnel.de
Sun Jun 8 07:44:24 CEST 2008


Hi,

as a side-note:

Johannes Wienke wrote:
> cpdef class Foo:
> 	cdef char* myData
> 
> 	cdef void setData(Foo self, char *data)
> 		self.myData = data

no need to declare the type of self here, you can just write

 	cdef void setData(self, char *data)
 		self.myData = data

Stefan


More information about the Cython-dev mailing list