Day 1 — Overview

Jun 8

Day 1: Classes & Instances

Mon, Jun 8 @ 19:30 UTC (2 hours)

Today is about building the case for objects. You’ll start with code that nearly works. You’ll work on small bits of related data and behavior loosely held together and you’ll feel the moment it stops scaling. Then you’ll rewrite the same code with classes and watch it grow up.

Two related lessons sit at the heart of the day: how to bundle data and behavior into a class, and where state lives. The mutable-class-attribute trap deserves real airtime. It’s a mistake you’ll hit in your own code within a week if you don’t see it now.

By the end of Day 1, you’ll have written your first real classes and you’ll know when to reach for a named class instead of a dictionary.

Today’s concepts:

Locked learning resources

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

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

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

Unlock This Lesson

Already a member? Sign-In

You must own this product to join the conversation.