defaultdict and dict?

Davy zhushenli at gmail.com
Fri Nov 9 06:01:47 EST 2007


Hi all,

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?

That is, when use defaultdict and when use dict? Any suggestions are
welcome!

Best regards,
Davy




More information about the Python-list mailing list