On Wed, Feb 11, 2009 at 5:32 PM, Jason Evans <[email protected]> wrote:
> I have a class declaration that looks like:
>
> cdef class DistMatrix:
>     # ...
>     cdef readonly size_t ntaxa
>

I'm now working on a patch to transform that in a property. However,
this should be done with care, regarding the difference between data
and non-data descriptors,
http://users.rcn.com/python/download/Descriptor.htm#id3 . I believe
the __set__ must be generated and it should raise AtributeError,
'can't set attribute'  (like builtin 'property' does when no 'set'
function is passed)

Comments?





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