Skip to main content

One doc tagged with "interfaces"

View all tags

Interfaces in Python: Informal and Formal

In Object-Oriented Programming, an interface is a description of the actions an object can do. It's a contract or a blueprint that defines a set of methods that a class must implement. For example, any object that acts as a "Data Parser" should have a .parse() method, regardless of whether it's parsing a PDF, a website, or a text file.