Hi all,

I read in the documentation that static methods can be defined as follows:

cdef int MyClass_my_method(int x):
    return x

cdef class MyClass:
    my_method = classmethod(MyClass_my_method)

Now, I would like to define the corresponding header:

cdef class MyClass:
    cdef my_method(int x)

However, when I try to compile I get:

"Self argument of C method does not match parent type."

What is the correct way to address this problem?

Regards
Stéfan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to