Class Concepts: Object-Oriented Programming in Python

Python includes mechanisms for doing object-oriented programming, where the data and operations on that data are structured together. The class keyword is how you create these structures in Python. Attributes are the data values, and methods are the function-like operations that you can perform on classes. In this course, you’ll explore writing code using class and its associated attributes and methods.

In this video course, you’ll learn about:

  • Why you write object-oriented code
  • How to write a class
  • What attributes and methods are
  • How to use the descriptor protocol

This course is the first in a three-part series. Part two covers how to write reusable hierarchies of classes using inheritance, while part three dives deeper into the philosophy behind writing good object-oriented code.

Download

Sample Code (.zip)

5.2 KB
Download

Course Slides (.pdf)

1013.9 KB

What’s Included:

Downloadable Resources:

Related Learning Paths:

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