Coding to interfaces: Structural Subtyping in Python
summary
How to separate interface from implementation in dynamically typed Python using structural subtyping. It introduces Python typing Protocols and shows how to code to interfaces with structural subtyping, covering related best practices such as type hinting, static analysis, and clean code principles.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 0:46What are interfaces
- 3:57Static type checking
- 7:08Type hints with mypy
- 9:19Defining interfaces with ABC
- 13:13Structural subtyping with Protocols
- 16:42Benefits of decoupling
- 18:08Interface aggregation
- 21:44Protocol vs ABC
- 22:04Q&A
- 25:19TDD with interfaces
- 26:02Closing








