Robert Bradshaw wrote: > Yes. To clarify, the bodies of def methods are compiled into C code > just as with cdef methods, and special methods are special, meaning > the get called as C functions via the Python/C API, so they are not > really "def" methods but nor are they really "cdef" methods.
In case anyone is wondering, the reason they're defined with "def" is that they're invoked (albeit indirectly) from Python code, and their headers are more like those of Python functions than C functions -- they can have * and ** arguments, default values, etc., at least in some cases. In Pyrex, the machinery for handling all that exists in the parse tree nodes for "def" functions but not "cdef" ones. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
