Attribute lookup, from dot to descriptor
Follow one dotted expression through instance state, class namespaces, descriptors, method binding, and fallback hooks.
Independent field notes / Vol. 01
Precise explanations of the machinery, patterns, and tradeoffs that make Python feel deceptively simple.
Read the cover storyThe index
11 notes, edited for signal.
Follow one dotted expression through instance state, class namespaces, descriptors, method binding, and fallback hooks.
Use the call protocol to combine behavior with explicit state without pretending every callable is a function.
Design collection behavior by choosing iteration, membership, sizing, indexing, and mutation deliberately.
Make resource lifetime visible, exception-safe, and reusable with the context management protocol.
Replace the parent-call myth with a precise model of MRO-relative lookup, cooperative methods, and safe multiple inheritance.
Trace a class statement through namespace preparation, body execution, metaclass construction, descriptors, and subclass hooks.
Understand Python name binding so mocks replace the object production code will actually resolve.
Design around behavior with Python data-model protocols, structural typing, narrow contracts, and honest runtime validation.
Editorial policy
No listicles. No folklore. No just trust me abstractions.
Every note should leave you with a better model of the system, not just another snippet to paste.