~/talk

Low Level Python a Deep dive into the python sources

Talkat PyCon Israel 2017 · 2017-06-11..06-13· [compilers-and-language-design, python]
name:Yam Peleg
links:none on file
slides:none on file

Walks through CPython internals with concrete pointers: using dis.py to see bytecode, .pyc files with magic bytes and timestamp, and the interpreter entry in main.c. Shows the bytecode loop in PyEval_EvalFrameEx, frame objects and value stack, and that generators are objects holding code, frame and locals. Explains refcounted PyObject type system, GCC computed-goto in the sources, allocator layout with 256 KB arenas split into 4 KB pools, and why freed memory rarely returns to the OS.

AI-written summary · about

  1. 0:00Introduction to low-level Python
  2. 1:50Python interpreter and bytecode
  3. 3:15CPython source code overview
  4. 5:07Opcode implementation in eval.c
  5. 6:57Frame objects and execution model
  6. 8:26Python object types and memory
  7. 9:30Python memory management
  8. 11:58Function objects and closures
  9. 13:33Spaghetti code in CPython
  10. 14:37Iterators and generators
  11. 16:50Class objects and metaclasses
  12. 19:02Summary and key takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.