Re: Extending collections.defaultdict

Franck Pommereau <[email protected]> Thu, 02 Apr 2009 14:41:44 +0200
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
> 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