On Wed, Apr 22, 2009 at 9:59 PM, Greg Ewing <[email protected]> wrote:
> Stefan Behnel wrote:
>
>> I also wonder how exception subtyping is handled for Python versions
>> before 2.5. I assume this is left to the user, so that
>>
>>     cdef class MyExc(Exception): pass
>>
>> will require Py2.5+, whereas
>>
>>     class MyExc(Exception): pass
>>
>> should still work in Py2.3.
>
> Yes. Do you think it can/should be handled differently?
>
> --
> Greg
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>

AFAIK, you cannot handle it differently... old-style, aka classic
classes are actually instances (of types.ClassType), so a cdef class
class (implicitly new-style) cannot inherit from an instance, very
much like "class A([]): pass" ends-up failing in core Py2.


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to