This recipe emulates the defaultdict class from Python 2.5 in Python 2.3 [1]