python
10 articles tagged python.
-
Python Asyncio Task Cancellation
How asyncio delivers CancelledError at await points, propagates it through coroutines, and still runs cleanup during cancellation.
-
Python Descriptors: Properties, Methods, and Slots
How Python’s __get__, __set__, and __delete__ hooks control attribute access and power properties, bound methods, and slot-based storage.
-
Python’s Vectorcall Protocol
How CPython passes callable arguments as arrays to avoid temporary tuples, dictionaries, and bound methods on common calls.
-
CPython’s Cyclic Garbage Collector
How CPython finds reference cycles that reference counting cannot reclaim, and how generations and thresholds decide when to collect them.
-
CPython’s Global Interpreter Lock
How CPython’s GIL protects interpreter state, makes threads contend, and affects CPU-bound and I/O-bound programs differently.
-
Python Asyncio Task Cancellation
Understand how asyncio injects CancelledError, propagates cancellation through awaited tasks, and lets coroutines clean up safely.
-
Python Descriptors and Method Binding
How Python routes attribute reads and writes through descriptors, and how the same mechanism implements properties, bound methods, and class methods.
-
Python Descriptors and Attribute Access
Understand how Python descriptors power properties, bound methods, and ORM fields by intercepting reads, writes, and deletion.
-
Inside Python’s asyncio Event Loop
How await suspends a Task, how I/O and timers wake it, and how the event loop chooses callbacks from its ready queue.
-
CPython’s Global Interpreter Lock
How CPython’s GIL protects interpreter state, coordinates thread execution, and lets native extensions run parallel or blocking work safely.