Building your own kind of dictionary
summary
This presentation shows how to implement a custom dictionary-like object in Python that enforces constraints on values: some keys must map to instances of a specified class (e.g., a Color class) and other keys must map to elements of a particular set (e.g., a set of allowed movies). The talk demonstrates iterating through different implementations, using tests to validate them, and highlights issues encountered with super() plus a bit of explanation about relevant Python internals.
AI-written summary · about







