Tutorial sequence

The Object Model Is the Language

5of 5 published
  1. 01

    advanced / 31 min

    Attribute lookup, from dot to descriptor

    Follow one dotted expression through instance state, class namespaces, descriptors, method binding, and fallback hooks.

    Read
  2. 02

    advanced / 30 min

    super() is a cooperative MRO machine

    Replace the parent-call myth with a precise model of MRO-relative lookup, cooperative methods, and safe multiple inheritance.

    Read
  3. 03

    advanced / 32 min

    How classes are built

    Trace a class statement through namespace preparation, body execution, metaclass construction, descriptors, and subclass hooks.

    Read
  4. 04

    advanced / 29 min

    What __slots__ really changes

    Understand slotted storage, descriptors, inheritance, weak references, and when measured memory savings justify the constraints.

    Read
  5. 05

    advanced / 29 min

    Protocols beat inheritance

    Design around behavior with Python data-model protocols, structural typing, narrow contracts, and honest runtime validation.

    Read