Very nice and detailed video tut by Philip Guo
Lecture 1 - Interpreter and source code overview
Lecture 2 - Opcodes and main interpreter loop
This lecture references:
Here are nine lectures walking through the internals of CPython, the canonical Python interpreter implemented in C. They were from a dynamic programming languages course that I taught in Fall 2014 at the University of Rochester. The format isn't ideal, but I haven't seen this level of detail about CPython presented online, so I wanted to share these videos.
Lecture 1 - Interpreter and source code overview
Lecture 2 - Opcodes and main interpreter loop
This lecture references:
- Include/opcode.h
- Python/ceval.c
- Python dis module and bytecode reference
- Include/code.h
- Include/frameobject.h
- Objects/frameobject.c
- Python/ceval.c
- Include/object.h
- Objects/object.c
- Python data model (Python API)
- Python object protocol (C API)
- Objects/abstract.c
- Include/stringobject.h
- Objects/stringobject.c
- Include/code.h
- Include/funcobject.h
- Objects/codeobject.c
- Objects/funcobject.c
- Include/iterobject.h
- Objects/iterobject.c
- Objects/abstract.c
- Python/ceval.c
- Include/classobject.h
- Objects/classobject.c
- Objects/abstract.c
- Python/ceval.c
- Include/genobject.h
- Objects/genobject.c
- Python/ceval.c