Day 2 — Overview

Jun 9

Day 2: Methods & Data Model

Tue, Jun 9 @ 19:30 UTC (2 hours)

Today is the day Python OOP clicks for most people. You’ll add behavior to your classes through methods and you’ll learn there are three flavors (instance, class, and static), each with its own purpose. Classmethods as alternate constructors will pay off again on Day 3.

Then the day’s centerpiece: Python’s data model. Your custom classes don’t just use the built-in syntax of for-loops, indexing, sorting, and printing. They are part of it. We’ll take a class that wraps a built-in collection and re-express it so Python treats it exactly like any of its native sequences.

By the end of Day 2, the gap between “custom class” and “built-in type” will feel a lot smaller.

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.