Hi,
a while ago, we had agreed that a "final" directive would be nice to have
for cdef classes. I implemented the basics for that (i.e. "final" types are
no longer subclassable from Python), and I also added an "internal"
directive that prevents a type from appearing in the module dict. So you
can now write something like this for a type that you only use internally
in your module:
@cython.final
@cython.internal
cdef class _MyInternalType:
...
http://trac.cython.org/cython_trac/ticket/263
http://trac.cython.org/cython_trac/ticket/585
I think the "final" directive name was pretty much agreed on, but what
about the "internal" directive? Any objections to that?
There are currently no optimisations for final types, but that may come in
the future.
BTW, since I expect that both will not be features that users deploy all
over the place (and I actually think that "final" should be used with some
care), I didn't add a modifier to the parser syntax. It's currently a pure
directive. And I would prefer leaving it that way.
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev