What's the difference between UserDict
, dict
and ABC
and which one is recommended? The docs seem to deprecate UserDict
?
Also it seems UserDict's update()
would use my setitem
method whereas dict
doesn't? Which methods are really essential to override given I want custom setitem
and getitem
function?
With ABC
s I'd have to implement absolutely all methods since it provides no default implementation?
I want to make a dict
that does two things:
intern()
all keys and values- store some of the values in an SQLite database
So which of UserDict
, dict
and ABC
would best allow me to do this?