From d632c55068ca77d68b4399bf311499329d27cd32 Mon Sep 17 00:00:00 2001 From: nbruin Date: Wed, 10 Apr 2013 19:40:08 -0700 Subject: [PATCH] explain difference between cdef and cpdef --- docs/src/userguide/extension_types.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- 2.7.4