Skip to content

A Google of Pythons

I wish I were talented enough to work at Google and sit around having conversations like this one, which Guido recounted on python-dev:

Over lunch with Alex Martelli, he proposed that a subclass of dict with this behavior (but implemented in C) would be a good addition to the language. It looks like it wouldn’t be hard to implement. It could be a builtin named defaultdict. The first, required, argument to the constructor should be the default value. Remaining arguments (even keyword args) are passed unchanged to the dict constructor.

Post a Comment

You must be logged in to post a comment.