<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 5, 2016 at 6:15 PM Neil Girdhar <<a href="mailto:mistersheik@gmail.com">mistersheik@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is it deprecated?<div><br></div><div>I've seen this question a lot on stackoverflow:  <a href="http://stackoverflow.com/questions/7148419/subclass-dict-userdict-dict-or-abc" target="_blank">http://stackoverflow.com/questions/7148419/subclass-dict-userdict-dict-or-abc</a> <a href="http://stackoverflow.com/questions/2390827/how-to-properly-subclass-dict-and-override-getitem-setitem" target="_blank">http://stackoverflow.com/questions/2390827/how-to-properly-subclass-dict-and-override-getitem-setitem</a> <a href="http://stackoverflow.com/questions/10901048/i-want-to-subclass-dict-and-set-default-values" target="_blank">http://stackoverflow.com/questions/10901048/i-want-to-subclass-dict-and-set-default-values</a> </div><div>I still have no idea what the right answer is.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 5, 2016 at 6:11 PM Guido van Rossum <<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Because you shouldn't be using UserDict.<br></blockquote></div></blockquote><div><br></div><div>Subclass dict when you only want to change exactly the methods you override, and/or implement __missing__.</div><div><br></div><div>Subclass MutableMapping when you want to take advantage of the mixin methods interacting with your implementations of the abstract methods.</div></div></div>