On Nov 9, 3:01 am, Davy <[EMAIL PROTECTED]> wrote: > In Python 2.5 document, defaultdict is called high performance > container. From document, we can know defaultdict is subclass of dict. > So, why defaultdict have higher performance than dict? And at what > circumstance, we can make use of such high performance?
Defaultdicts only area of superiority is the speed and code economy for the case where you need to automatically fill-in missing values (it runs circles around dict.setdefault). Raymond -- http://mail.python.org/mailman/listinfo/python-list