Pointers in Python
summary
Walks through compiling CPython from source (Docker recommended), then literally adds & and syntax and creates pointer builtin object in the interpreter, triggering a segmentation fault, fixing it by plugging parser, upcode, and VM dispatch, and then adding GC/trash‑can support so cycles free memory. Implements methods to read and write raw bytes* and to subscribe into object memory, demonstrates swapping list internals and mutating a string in place, and shows the whole pipeline ultimately works after successive patches.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 25:05CPython compilation pipeline
- 46:10Modifying Python syntax for pointers
- 1:00:02Implementing pointer objects
- 1:25:21Memory management and garbage collection
- 2:02:29Unsafe memory manipulation
- 2:12:41Pointer usage demonstration
- 2:25:00Q&A
related talks
31mUnderstanding Python from the inside: C concepts to dive into CPython fearless
22mLow Level Python a Deep dive into the python sources
30mDemystifying Python’s Internals: Diving into CPython by implementing...
31mPlaying with CPython Objects Internals
01h 18mPython 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods
23mMemoirs of a Python Object: Memory Management and Improving Performance
27mVariables and objects in Python: it's pointers all the way down
01h 18mPython 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods
