5 Jul
2016
5 Jul
'16
10:18 p.m.
On Tue, Jul 5, 2016 at 6:15 PM Neil Girdhar
Is it deprecated?
I've seen this question a lot on stackoverflow: http://stackoverflow.com/questions/7148419/subclass-dict-userdict-dict-or-ab...
http://stackoverflow.com/questions/2390827/how-to-properly-subclass-dict-and... http://stackoverflow.com/questions/10901048/i-want-to-subclass-dict-and-set-...
I still have no idea what the right answer is.
On Tue, Jul 5, 2016 at 6:11 PM Guido van Rossum
wrote: Because you shouldn't be using UserDict.
Subclass dict when you only want to change exactly the methods you override, and/or implement __missing__. Subclass MutableMapping when you want to take advantage of the mixin methods interacting with your implementations of the abstract methods.