On 30 October 2010 22:16, Stefan Behnel <[email protected]> wrote:
> 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:
>
>   �[email protected]
>   �[email protected]
>    cdef class _MyInternalType:
>       ...
>
> http://trac.cython.org/cython_trac/ticket/263
> http://trac.cython.org/cython_trac/ticket/585
>

Many thanks for this, Stefan!

> I think the "final" directive name was pretty much agreed on, but what
> about the "internal" directive? Any objections to that?
>

Perhaps "private" ? I still prefer "internal".

> 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.
>

I agree, +1 for the current implementation.



-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to