What does `typing.Protocol` enable in Python’s type system?

Python Hard
Select the correct answer: Single Choice

Key points

  • `typing.Protocol` enables structural subtyping in Python
  • Classes can satisfy a Protocol without explicit inheritance
  • Supports statically typed duck typing
  • Enhances type checking in Python

Ready to go further?