[Pyrex] Extending collections.defaultdict
Franck Pommereau
pommereau at univ-paris12.fr
Thu Apr 2 13:17:56 CEST 2009
Hi all,
I would like to create in Cython/Pyrex a new type by extending
collections.defaultdict class. I've found that I can extend dict by using :
cdef extern from "dictobject.h":
ctypedef class __builtin__.dict [object PyDictObject]:
pass
cdef class hdict (dict):
...
But there is no header file such as "dictobject.h" for module
collections nor I could find one that declares defaultdict.
Does anyone knows how I could declare the existence of defaultdict?
Thanks in advance for help.
Cheers,
Franck
More information about the Pyrex
mailing list