Skip to content

Glossary: Software Design Patterns

Protocol

Also written: typing.Protocol

A class from the `typing` module that lists the methods an interface needs, with `...` as each body. Classes match it just by having those methods.

Where the book teaches it

Related terms

InterfaceDuck typingmypy