[Pyrex] Extending collections.defaultdict

Franck Pommereau pommereau at univ-paris12.fr
Thu Apr 2 14:41:44 CEST 2009


> Actually, "defaultdict" is a subtype of dict that adds an additional
> field. The problem is that "defaultdict" is not a public type, it is only
> defined in "Modules/_collections.c" in the Python sources.
> 
> You may manage to redefine it in your own header file and use that, but
> that will not safe you from future changes to the type inside Python. It's
> not a public type, so the Python developers are free to change it at need.

OK, I understand. So I thinks I'll just reimplement what I need starting
from dict.

Thanks for these quick answers!

Cheers,
Franck




More information about the Pyrex mailing list