Design and Guidance: Object-Oriented Programming in Python

Writing good object-oriented code is about more than just how to write the syntax. Knowing when and when not to use it, as well as guiding principles behind object-oriented design will help you write better code.

In this course, you’ll learn about:

  • The objected-oriented approach in Python vs other languages
  • Cases in which you shouldn’t use classes in Python
  • Alternatives to inheritance in structuring your code
  • The SOLID principles for improving your code

SOLID is an acronym for five principles that you should use when thinking about object-oriented code. The principles are:

  • The Single-Responsibility Principle (SRP)
  • The Open-Closed Principle (OCP)
  • The Liskov Substitution Principle (LSP)
  • The Interface Segregation Principle (ISP)
  • The Dependency Inversion Principle (DIP)

This course is the third in a three-part series. Part one is an introduction to class syntax, where you learn how to write a class and use its attributes and methods. Part two is about inheritance and class internals.

What’s Included:

Downloadable Resources:

About Christopher Trudeau

Christopher has a passion for the Python language and writes for Real Python. He is a consultant who helps advise organizations on how to improve their technical teams.

» More about Christopher

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

« Browse All Courses