On Wed, Nov 21, 2012 at 2:59 PM, Volker Braun <
vbrau...@gmail.com> wrote:
> Cython 0.17.2 doesn't accept that and emits "Only final types can have final
> Python (def/cpdef) methods". But
>
http://trac.cython.org/cython_trac/ticket/586 suggests that "final" methods
> in non-final cdef classes should work. Bug or feature? That is, should I
> open a ticket or is it intentional? I would have thought that its ok to have
> final methods, the only error I would have expect is when I try to override
> them in a derived class (which is Cython's "Overriding final methods is not
> allowed" error).
The issue is how to prevent them from being overridden in Python
(which is not unsolveable, could probably be done pretty easily with a
metaclass). It's intentional that we disallow it before such a
mechanism is in place, but worth filing a ticket to add this feature.
- Robert