R

ReflexKR

Reflex Docs

Name Tag Airport: Python's Object Model

·

Course overview

1

A tag is not the bag: names and objects

2

Sealed bags: mutable and immutable

3

Bags inside bags: containers and copying

4

Handing over a bag: functions and arguments

5

Zones and passes: scope

6

Carry-on bags: closures

7

The bag spec: classes and instances

8

Standard airport procedures: dunder methods

9

The spec behind the spec: inheritance and MRO

10

The checkpoint: how attribute access really works

11

Unclaimed bags: memory and GC

12

Locker numbers: hashing, equality and the big picture

Name Tag Airport: Python's Object Model

Course overview

Join the baggage center at Haneulseom International Airport as its new tag handler and solve twelve lost-baggage cases, watching names, objects, references, scopes, classes and memory on a live tag board. A 10-hour course.

10 hours12 lessonsReflex 0.10.0

Two floors beneath Haneulseom International Airport lies a baggage center the size of a football field. The staff call it the Heap Hall. One bag can carry many tags, and a bag with no tags left on it is eventually thrown away.

That is exactly how Python's variables and objects behave. A variable is not a box that holds a value; it is a name tag hung on an object. Keep that one picture in your head, and bugs like "the list that changed the original too", "the default argument that piles up on every call" or "the sticker that showed up on every instance" stop being mysteries.

Starting today, you are the center's new tag handler. Over ten hours you will solve twelve lost-baggage cases and learn Python's object model along the way.

The people at the center

WhoWhat they do
Supervisor Do MiranThirty years at the baggage center. Her favorite line: "One bag, many tags." She hands you a lost-baggage report at the start of each lesson and leaves a note in her notebook at the end.
PinA baggage-sorting robot that points with arrows instead of talking. The tag board's mascot, Pin gives short tips and warns you about traps.
The reportersA new one every lesson: a travel agent, a school-trip teacher, a startup developer, an exhibition shipping coordinator and more.

How a lesson flows

  1. You receive a lost-baggage report. It says what went missing and what it takes to close the case.
  2. You work through the concepts and the code with the supervisor.
  3. You step through code one line at a time on the tag board. It is not an illustration: the server really runs the example and records, line by line, how the name tags and bags are connected. Along the way you first guess "what will change when the next line runs?"
  4. You close the case, and the key points of the lesson are added, one line each, to the supervisor's notebook.
PartLessonsTopics
Names and objects1–4=, is, mutable and immutable, copying, function arguments
How names are found5–6Scope (LEGB), closures
Classes are objects7–10Classes and instances, dunder methods, inheritance and MRO, descriptors
Object lifetime and identity11–12Reference counting, GC, weak references, hashing and equality

Each lesson closes its own case, so you can pick only the ones you need. Still, the picture from Lesson 1 comes back in every lesson, so start there.

What you need

  • Enough Python to write functions and use lists, and to have built a simple class at least once.
  • Python 3.14. Every example was run and checked on 3.14. Details that depend on the CPython implementation, such as the small-integer cache or sys.getsizeof values, are marked as such.
  • The tag boards run right on this page. If you want to run an example yourself, save it to a .py file and run it.

Pin says

→ Before you press 'Next line' on the tag board, say out loud what will change. If you're right, you've got it. If you're wrong, the difference is what you'll learn today.

Next →

Lesson 1 · A tag is not the bag: names and objects

Get news about new lessons

We'll email you when this course gets new lessons or a follow-up course opens.

We collect: your email address · Purpose: news about new lessons or the launch of this course · Kept until: you ask us to remove it. We never use it for anything else or share it. Reply to any notice email and we'll delete it right away.

Questions & answers

Ask anything about this lesson. Questions from every language version of this page appear together.

Shown as plain text, without links or formatting.

R

ReflexKR

Learn Python and Reflex by doing. Every example was run and verified on Reflex 0.10.0.

ReflexKR is free, with no banner ads. If it helped you, you can support it with a coffee. ☕ Buy us a coffee

Affiliate disclosure
한국어English日本語简体中文EspañolDeutsch

© 2026 ReflexKR · Since 2026 · CC BY-NC 4.0

Built with Reflex