Week 10: Classes and Objects
223 words
1 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Week 10: Classes and Objects > **Course:** Jan 2026 - Python > **Focus:** Object creation, method behavior, and shared class state. --- ## 1.

Visual strip
Relevant recall pieces for this note
Week 10: Classes and Objects
Course: Jan 2026 - Python Focus: Object creation, method behavior, and shared class state.
1. Core idea
Week 10 is the first real object-oriented checkpoint: create objects, store state, and let methods operate on that state.
What to remember
__init__runs when an object is created.selfrefers to the current object.- Instance attributes belong to one object.
- Class attributes are shared across all objects.
- A method must use
selfto reach the object's data.
2. Common traps
- Calling a constructor with the wrong number of arguments.
- Forgetting that a class counter counts object creation.
- Confusing a method definition with a method call.
- Printing members depends on how the container stores them, usually in insertion order.
3. Speedrun pattern
When you see a Week 10 question, ask:
- Is this about an object or the class itself?
- Does the question test state, behavior, or counting?
- Which attribute is shared and which one is per object?
4. Micro revision
- Constructor =
__init__ - Shared state = class attribute
- Object state = instance attribute
Assignment anchor
Navigation
- Previous: Week 9 Notes
- Next: none in the normal assignment track