Python interfaces: abandon ABC and switch to Protocols
<p>I used a standard Python library <code>abc</code> to define interfaces for the last 10 years of my career. But recently, I found that relatively new Python <a href="https://peps.python.org/pep-0544/" rel="noopener ugc nofollow" target="_blank">Protocols</a> are way nicer. People find uses for both technologies. But I want to convince you to completely jump ships and start using them instead of more traditional techniques.</p>
<h1>Python interfaces: what can you use?</h1>
<p>Python is somewhat different from other popular languages since there are no interfaces on a language level. But there are several library implementations. The <code>abc</code> package is probably the most popular:</p>
<p><a href="https://medium.com/gitconnected/python-interfaces-choose-protocols-over-abc-3982e112342e"><strong>Read More</strong></a></p>