[Python-Dev] Proposal: defaultdict
Georg Brandl
g.brandl at gmx.net
Fri Feb 17 16:29:59 CET 2006
skip at pobox.com wrote:
> Guido> Over lunch with Alex Martelli, he proposed that a subclass of
> Guido> dict with this behavior (but implemented in C) would be a good
> Guido> addition to the language.
>
> Instead, why not define setdefault() the way it should have been done in the
> first place? When you create a dict it has the current behavior. If you
> then call its setdefault() method that becomes the default value for missing
> keys.
That puts it off until 3.0.
>From what I read I think defaultdict won't become builtin anyway.
Georg
More information about the Python-Dev
mailing list