Python Descriptors and `__get__`
Learn how Python descriptors work: the __get__, __set__, and __delete__ protocol that powers properties, methods, and attribute access control.
Learn Python programming from scratch
Learn how Python descriptors work: the __get__, __set__, and __delete__ protocol that powers properties, methods, and attribute access control.
Compare Python properties and descriptors: when to use @property for simple cases and when to reach for a full descriptor class for reusable attribute management.
Learn how Python metaclasses work: using type() to create classes dynamically, writing custom metaclasses, and knowing when metaclasses are the right tool.
Learn the step-by-step process Python uses to resolve attribute access, from data descriptors to instance dictionaries to __getattr__ fallback.
Learn how Python's C3 linearization determines method resolution order, how super() works, and how to handle diamond inheritance correctly.
Learn how Python creates classes step by step: namespace preparation, metaclass invocation, __init_subclass__, and the full lifecycle of the class statement.
Learn how Python resolves names using the LEGB rule, how __dict__ stores attributes, and how closures capture variables from enclosing scopes.
Learn how Python manages memory with reference counting and cyclic garbage collection, plus practical tools for debugging memory issues.
Learn how to use weak references with the weakref module to build caches, registries, and observer patterns that do not prevent garbage collection.
Learn Python's match-case statement: destructuring sequences, matching mappings, using guards, capturing values, and replacing complex if-elif chains.
Learn the most common advanced Python mistakes: mutable defaults, late-binding closures, misuse of metaclasses, and other pitfalls that trip up experienced developers.
Learn to build a production-ready Python library: package structure, public API design, type hints, custom exceptions, descriptors, and metaclasses working together.