Py

Classes & Objects

Module 11 of 14, Intermediate
🏗️

Classes & Objects

Model things with classes, methods, properties, inheritance, dunder methods and dataclasses.

0 of 6 lessons complete

6 lessons, 60 min

Start module

Lessons

1

Classes and objects

Create your own types that bundle data together.

9 min
2

Methods

Give objects behavior with functions that live inside the class.

10 min
3

Class attributes & properties

Share data across all instances and add smart, validated attributes.

11 min
4

Inheritance & super()

Build specialized classes on top of existing ones.

10 min
5

Dunder methods

Make your objects print nicely, compare, sort and work with len() and +.

11 min
6

Dataclasses

Skip the boilerplate: auto-generated __init__, __repr__ and ==.

9 min
🧰
Next module

Standard Library Tour