On 04/23/2013 08:01 AM, Stefan Behnel wrote:
Greg Ewing, 23.04.2013 01:16:
Only if subclassing of Slot and Context are forbidden. Right. Subtypes of a non-GC type can happily add attributes and start supporting cyclic garbage collection, including Python subclasses. So this only applies to "final" types and builtins. Not entirely uncommon, especially in the "keep this private thing alive until all referrers have died" use case, but I's say this restriction drops the priority a bit.
Does Cython have an equivalent of the "final class DoNoExtend { ... }" of the Java world? In any case, Greg has a good point. I seriously did not think about it just because I did not plan to derive from those classes. Greetings, Torsten -- DYNAmore Gesellschaft fuer Ingenieurdienstleistungen mbH Torsten Landschoff Office Dresden Tel: +49-(0)351-4519587 Fax: +49-(0)351-4519561 mailto:torsten.landschoff@dynamore.de http://www.dynamore.de DYNAmore Gesellschaft für FEM Ingenieurdienstleistungen mbH Registration court: Stuttgart, HRB 733694 Managing director: Prof. Dr. Karl Schweizerhof, Dipl.-Math. Ulrich Franz