[Pyrex] 'cdef'ed methods are always static?

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 22 01:28:05 CET 2006


Helmut Jarausch wrote:

> def call_Key(int parm):
>   ITC=IT()
>   IT.set_Fct(ITC,Key)   # This works just fine
> #  ITC.set_Fct(Key)     # This doesn't work     <=====

You haven't declared ITC as being of type IT, so Pyrex is
treating it as a plain Python object and looking for a
Python method called 'set_Fct', which it doesn't have.

Try this instead:

   def call_Key(int parm):
     cdef IT ITC
     ITC=IT()
     ITC.set_Fct(Key)

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiam!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+



More information about the Pyrex mailing list