On Thu, Apr 16, 2009 at 6:15 PM, Martin Gysel <[email protected]> wrote:
> Hi
>
> I wanna subclass the builtin dict. I read through the doc but
> unfortunately I haven't got it...
> I think I need to do something like:
>
> cdef extern from "dictobject.h":
>    ctypedef class __builtin__.dict [object PyDictObject]
>

I woud just use "Python.h" ... and add ": pass" at the end (perhaps
add a newline after ":")


> but then what else, how do I define it after declaration?

cdef class MyDict(dict):
   # implement me !!


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



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