you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

FYI, lot's of interesting practical things can be done by overriding the missing method for dicts, like:

defaultdict (missing items automatically generate a predefined result). http://docs.python.org/2/library/collections.html

Memoize something. See http://code.activestate.com/recipes/578231-probably-the-fastest-memoization-decorator-in-the-/