[Python-Dev] Proposal: defaultdict (original) (raw)

Aahz aahz at pythoncraft.com
Fri Feb 17 22🔞54 CET 2006


On Fri, Feb 17, 2006, Guido van Rossum wrote:

But the default implementation is designed so that we can write d = {} d.defaultfactory = list

+1

I actually like the fact that you're forced to use a separate statement for setting the default_factory. From my POV, this can go into 2.5.

(I was only +0 on the previous proposal and I was -1 on making it a built-in; this extension is much nicer.)

Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/

"19. A language that doesn't affect the way you think about programming, is not worth knowing." --Alan Perlis



More information about the Python-Dev mailing list