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

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Python Basics: Object-Oriented Programming (Summary)

Now you’re ready to use object-oriented programming (OOP) to write more readable and maintainable code in Python! With OOP, you can create blueprints for objects that contain both data and behaviors.

In this video course, you’ve learned how to:

  • Create a class
  • Use classes to create new objects
  • Instantiate classes with attributes and methods

To learn more about OOP, check out:

OOP is a big topic, and Real Python has several resources to help you expand your skill set. There’s even a learning path that’ll help you solidly grasp the fundamentals of OOP so that you can make your programs easier to write and maintain.

This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. Now that you’ve finished this course, you can continue your learning journey by checking out the other Python Basics courses.


Sample Code (.zip)

1.5 KB


Course Slides (.pdf)

5.2 MB

00:00 So you’re at the end of Object-Oriented Programming. That was a lot of information. And again, you have to practice this stuff for it to really sink in. A lot of it might seem like, what do I use that for?

00:10 Or in what cases is that useful? Can you give me a real-life application for this? And there are loads. You can use it everywhere. But it really won’t start to click until you yourself start using it or reading other people’s code and understanding why they’re using it in this case and how it’s being used. You’ve learned about the object-oriented programming paradigm.

00:32 Now, paradigm is just a fancy word for saying style or way of doing things. You’ve defined a class. You’ve added attributes to that class. You’ve added methods. You’ve used objects created from classes.

00:47 If you’re looking to dive in a bit deeper, Real Python has some additional resources for you to get stuck into. For instance, Object-Oriented Programming (OOP) in Python 3, which is a very in-depth article about everything you want to know about object-oriented programming in Python 3.

01:04 That itself also has another video course that goes into more detail than this one. You have Getters and Setters: Manage Attributes in Python. You’ll have seen how in the class instances in this course, you’ve been referencing attributes and setting attributes with dot notation and assignment directly, but the getting and setting of these attributes is a big topic.

01:27 If you’re curious about more of that and how to customize the behavior of that—maybe every time you get an attribute, you want something to happen. More likely, it is when you set an attribute you want something to happen.

01:38 Maybe it needs to update other attributes. Check out that article. And finally, we’ve got Operator and Function Overloading in Custom Python Classes. Now, this is the dunder methods we are talking about, where you can customize how your instances behave with certain operators, like + (addition), - (subtraction), == (equals to), > (greater than), < (less than). Now, Real Python’s content on object-oriented programming, classes, and instances is not limited to these three, but is a huge subject.

02:12 And that was an introduction to object-oriented programming. Thank you for watching and following along.

Become a Member to join the conversation.