"specialdict" module

Michele Simionato michele.simionato at gmail.com
Mon Apr 4 12:19:11 EDT 2005


About not using super: you might have problems in multiple inheritance.
Suppose I want to use both your defaultdict and a thirdpartdict. A
subclass

class mydict(defaultdict, thirdpartdict):
   pass

would not work if thirdpartdict requires a non-trivial __init__ , since
without super in defaultdict.__init__ you would just call dict.__init__
and not thirdpartdict.

            Michele Simionato




More information about the Python-list mailing list