Skip to content

Details

This talk demonstrates how to add the pipe operator (|>) to Python by modifying CPython's C source code, taking you through the complete execution pipeline from grammar definition to bytecode generation. We'll edit seven files across the lexer (tokenize.c), parser generator (python.gram), AST node definitions (pycore_ast.h), and compiler (compile.c) to implement Unix-style data pipelines (x |> f |> g) as a true language feature, exploring why DataFrame libraries independently solved this problem while Python forces you to read nested function calls backwards like someone who enjoys pain, and why the "proper" approach of modifying the interpreter reveals more about how Python actually works than any amount of reading documentation ever could.

Members are also interested in