> The truth, as Christian says above and as Raymond Hettinger recently > pointed out [1], is that __missing__ is used to *define* defaultdict as > a subclass of dict -- it's not used *by* defaultdict.
Your answer is confusing even me. ;) Let me try an easier to understand explanation. defaultdict *implements* __missing__() to provide the default dict behavior. You don't have to subclass from defaultdict to get the __missing__() feature. It's part of the dict interface since Python 2.5. Christian -- http://mail.python.org/mailman/listinfo/python-list