On Jan 7, 2010, at 3:08 PM, Robert Bradshaw wrote:
> On Jan 7, 2010, at 8:40 AM, Neil Ludban wrote:
> 
>> Forgot to ask, what if I wanted to add final/inline/whatever to the
>> entire class?
> 
> I don't think it's possible to prevent a class from being subclassed  
> in Python-land. (Well, not without checking raising some kind of a  
> runtime exception on instantiation or something like that...)
> 
> - Robert

Classes defined in extensions must explicitly indicate that they
support subclassing from pure Python.  NoneType and bool are core
types that don't, there may be others.

The intended point was that the semantics of making a class "final"
are understood and would imply the requested optimizations, while
the "inline" keyword wouldn't fit at all in this context.

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to