Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Python Interfaces: Object-Oriented Design Principles (Summary)

Python offers great flexibility when you’re creating interfaces. An informal Python interface is useful for small projects where you’re less likely to get confused as to what the return types of the methods are. As a project grows, the need for a formal Python interface becomes more important as it becomes more difficult to infer return types. This ensures that the concrete class, which implements the interface, overwrites the abstract methods.

Now you can:

  • Understand how interfaces work and the caveats of creating a Python interface
  • Understand the usefulness of interfaces in a dynamic language like Python
  • Implement formal and informal interfaces in Python
  • Compare Python interfaces to those in languages like Java, C++, and Go

Now that you’ve become familiar with how to create a Python interface, add a Python interface to your next project to see its usefulness in action!

Download

Course Slides (.pdf)

3.0 MB
Download

Sample Code (.zip)

4.2 KB

Become a Member to join the conversation.