Just a class diagram for Python 3 collections abstract base classes

Sangmoon Oh
1 min readSep 26, 2020
collections abstract base classes and built-in container types

Python’s built-in container types such as tuple, str, bytes, list, set, and 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.

The diagram is drawn using PlantUML and the source (in plain text) of it is here.

--

--

Sangmoon Oh

Interest and specialties in Java, data modeling, XML, concurrent programming, distributed computing, performance tuning, Ethereum, Solidity and so on.