5.3.2 Forward-declaring extension types

Extension types can be forward declared, which is necessary, e.g., if you have two extension types that need to refer to each other. For example,
cdef class MyRing # forward declaration

cdef class MyElement:
     cdef MyRing parent

cdef class MyRing:
     cdef MyElement basis

If you forward declare an extension type that has a base class, you must specify the base class in both the forward declaration and its subsequent definition. For example,

    cdef class A(B)

    ...

    cdef class A(B):
        # attributes and methods

See About this document... for information on suggesting changes.