Skip to content

Tag: subclass

Subclass dict: UserDict, dict or ABC?

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 f…