Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This talk uses a new pipe operator to explain how core language features move through CPython, from tokenization and grammar to compilation and bytecode. It also demonstrates modifying and compiling CPython and writing tests; some familiarity with Python is helpful, but C expertise is not required.
Syllabus
Intro
Sebastiaan Zeeff
From source code to execution
Adding a new binary operator: A pipe operator
Tokenization: from raw text to a stream of tokens
Tokenization: Add a token for the operator
Python's Grammar & the PEG Parser
Implementing our new grammar rule
Regenerate the parser based on the new grammar
Part 2: From Abstract Syntax Tree to Magic (Execution) Part 2
Making the compiler use the new 'opcode File: Python/compilec
Part 2: We've got Bytecode!
Recap & Remarks
Taught by
PyCon US