2011/8/30 Stefan Behnel <[email protected]>: > Robert Bradshaw, 30.08.2011 18:18: >> >> On Tue, Aug 30, 2011 at 9:14 AM, Vitja Makarov wrote: >>> >>> What about final classes with cpdef methods? >>> >>> @cython.final >>> class Foo: >>> cpdef bar(self): >>> pass >>> >>> Should that raise an error? >> >> That should be perfectly fine. > > Well, the 'final' decorator shouldn't work on normal Python classes. > > Regarding extension types, CPython has a way of declaring them 'final' with > a type flag, which effectively prevents them from being subclassed in > Python. So the above works as just fine for cdef classes. >
Ok. So final class could have cpdef methods but non-final extension type couldn't, am I right? -- vitja. _______________________________________________ cython-devel mailing list [email protected] http://mail.python.org/mailman/listinfo/cython-devel
