Extending collections.defaultdict
Franck Pommereau <[email protected]> Thu, 02 Apr 2009 13:17:56 +0200
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
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