Cited, real implementations to study (or point an agent at) when designing or reviewing class hierarchies.
logging. The guide's own worked example, shipped at scale:LoggercomposesHandlers,Filters, andFormatters — three orthogonal axes, no class per combination. docs.python.org/3/library/logging.htmlsocketserver. The honest contrast: the stdlib's mixin dodge (ThreadingMixIn+TCPServer=ThreadingTCPServer), useful to study as the alternative the principle warns will reconverge on the diamond. docs.python.org/3/library/socketserver.html
- pytest's plugin architecture. Behavior is added by composing plugins registered with hook functions — not by subclassing the test runner. docs.pytest.org/en/stable/how-to/writing_plugins.html
- The guide chapter — the subclass-explosion case study and the taxonomy of dodges (multiple inheritance, mixins, dynamically built classes). python-patterns.guide/gang-of-four/composition-over-inheritance
In every healthy example the combination is expressed at runtime — a constructor call, a registration — while the pieces stay single-purpose. When reviewing, count adjectives in class names: two or more is the explosion starting.