This is like Interface
in Go (or Java, i don’t speak Java but the article say so).
You must log in or # to comment.
OK, but why would I use this over ABCs? (Abstract Base Class). Or is it just different?
Protocols are static duck typing. An object is a valid instance of protocol if it implements all the methods defined in the protocol, even if it doesn’t declare it as implementing it. That last bit is important and the most distinguishing factor compared to an ABC.