Re: [Cython] Virtual cpdef methods

2016-06-20 Thread Jeroen Demeyer
On 2016-06-20 17:31, Robert Bradshaw wrote: All methods (cdef, cpdef, and def) are virtual by default in Cython, just like Python. I meant "pure virtual" or "abstract": just declared but without an implementation. Sounds like you want a cdef function to me. You can override a cdef function

Re: [Cython] Virtual cpdef methods

2016-06-20 Thread Greg Ewing
Robert Bradshaw wrote: All methods (cdef, cpdef, and def) are virtual by default in Cython, just like Python. On Mon, Jun 20, 2016 at 6:08 AM, Jeroen Demeyer wrote: I would like to have a "virtual" cpdef method: something which allows a fast Cython call *when implemented* but without a defaul

Re: [Cython] Virtual cpdef methods

2016-06-20 Thread Robert Bradshaw
All methods (cdef, cpdef, and def) are virtual by default in Cython, just like Python. Sounds like you want a cdef function to me. You can override a cdef function with a cpdef function for any subclass that wishing to expose it to Python. On Mon, Jun 20, 2016 at 6:08 AM, Jeroen Demeyer wrote: >

[Cython] Virtual cpdef methods

2016-06-20 Thread Jeroen Demeyer
Hello, I would like to have a "virtual" cpdef method: something which allows a fast Cython call *when implemented* but without a default implementation. The most simple implementation would be a "cpdef" method but without an entry for the method in the Python method table. Of course, the "c