Talks - Irit Katriel: CPython's Compilation Pipeline

Опубликовано: 06 Ноябрь 2024
на канале: PyCon US
223
9

Over the last couple of years, CPython's compiler was refactored. In version 3.13, we will have access from Python scripts to more of the compilation stages: Instead of the old 4-stage pipeline (source -- tokens -- AST -- code object), we will have a more refined pipeline (source -- tokens -- AST -- optimized AST -- pseudo bytecode -- optimized pseudo bytecode -- bytecode -- code object).

This talk describes the new compilation pipeline of CPython 3.13 and the possibilities that it creates for CPython users, maintainers and educators. It presents Codoscope, a new vizualization tool that displays CPython's process of translating Python source code into an executable code object.