Python’s built-in container types such as
dict show well why Python is so popular. They cover all the usage in view of mutability and item ordering, and the operations and behaviors are really intuitive, expressive and concise. Especially slice notation and high-order functions on these container types are even beautiful.
In Python, these container types are generalized by abstract base classes mechanism to be extended easily. The above class diagram depicts main classes in Python’s
collections.abs module and their relationship with built-in container types.