11
Python interfaces: abandon ABC and switch to Protocols
(levelup.gitconnected.com)
Welcome to the Python community on the programming.dev Lemmy instance!
October 2023
November 2023
Past
July 2023
August 2023
September 2023
The opposite is true. If you have two interfaces that contain methods with the same name, then they have the same
typing.Protocol
. It is not possible to specify preconditions or contracts, as you would with abc.