Interfaces and Protocols
Some of you read my previous post on
typing.Protocols
and probably wondered: “what aboutzope.interface
?” I’ve advocated strongly for it in the past — but now that we have Mypy andProtocol
s, is it simply a relic of an earlier time? Can we entirely replace it withProtocol
?Let’s have a look.
Source: Interfaces and Protocols.