[Pyrex] #if

Bryan Weingarten bryan.weingarten at pobox.com
Wed Oct 22 07:52:20 CEST 2003


>>i didn't change a line of code in my test program, but i was able to 
>>successfully excercise mpgedit_play  as a class and as as cdef class. 
>>    
>>
>
>I don't see how that could have worked, since Python classes
>can't have C attributes. The code I posted could only work
>with an extension type.
>
>  
>

sorry, i should have been more explicit.  my original class was a 
regular class with no c attributes, i'm now using your way with a cdef. 
with c attributes.  with either way of coding the class/type, the test 
program (from the users point of view) that calls my pyrex c extension 
didn't change at all.   it doesn't seem to matter which technique i 
use.  i guess this means that classes and types are very similar.

bryan







More information about the Pyrex mailing list