The Canon / R4 · root

Protocols instead of interfaces

An interface is not a declaration but a set of dunders in the type's slots; checkable contracts were bolted onto the language twice, and both times later.

1What follows from this

2Chapters of this root

11Protocols12Context managers and exceptions

Written by · The Python Canon