Skip to main content Brad's PyNotes

Posts on Protocols

  1. PEP 544: Protocols - Structural Subtyping (Static Duck Typing)

    TL;DR

    PEP 544 introduces Protocol classes that enable structural subtyping (static duck typing) - type checking based on what methods an object has rather than its inheritance hierarchy, making Python’s type system more flexible and duck-typing friendly.