From: nbruin Date: Thu, 11 Apr 2013 02:40:08 +0000 (-0700) Subject: explain difference between cdef and cpdef X-Git-Tag: 0.19b2~8^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d632c55068ca77d68b4399bf311499329d27cd32;p=platform%2Fupstream%2Fpython-cython.git explain difference between cdef and cpdef --- diff --git a/docs/src/userguide/extension_types.rst b/docs/src/userguide/extension_types.rst index 20f03bc..5d90aea 100644 --- a/docs/src/userguide/extension_types.rst +++ b/docs/src/userguide/extension_types.rst @@ -343,7 +343,9 @@ C methods Extension types can have C methods as well as Python methods. Like C functions, C methods are declared using :keyword:`cdef` or :keyword:`cpdef` instead of :keyword:`def`. C methods are "virtual", and may be overridden in derived -extension types.:: +extension types. In addition, :keyword:`cpdef` methods can even be overridden by python +methods when called as C method. This adds a little to their calling overhead +compared to a :keyword:`cdef` methd:: # pets.pyx cdef class Parrot: