Hack the CPython
Offered By: EuroPython Conference via YouTube
Course Description
Overview
Explore the dynamic nature of CPython and learn advanced hacking techniques in this 17-minute EuroPython Conference talk. Delve into the interpreter's internals step-by-step, from adding new syntax to modifying the evaluation loop. Discover how to manipulate AST, bytecode, CTypes, and the CPython evaluation loop. Gain insights into disassembling and reassembling bytecode, adding custom statements, and implementing runtime syntax modifications. Cover topics such as lexing, parsing, AST manipulation, bytecode generation, and evaluation. Learn practical hacks like modifying tokens, creating custom decode functions, implementing PEPs, and optimizing code execution. Uncover the potential for extending Python's capabilities through advanced interpreter manipulation techniques.
Syllabus
Intro
Lexing - Tokenization
Parsing - Parser
AST (where actual hack begins)
Bytecode Generation
Evaluation
Walrus on Python 3.7
The Strategy For Hacking
Modifiying the Tokens
Modifying The Source
Creating decode function for Encoding
Adding a search function
Implementing Peps (Example PEP313)
Scoping
Runtime
Rusty Return
Transforming AST (2)
Poophole Optimizer
Optimize Function
Optimizers 2 (Example Elem Local Vars)
Catlizor v1-extended
Hooking
Taught by
EuroPython Conference
Related Courses
A Brief History of Data StorageEuroPython Conference via YouTube Breaking the Stereotype - Evolution & Persistence of Gender Bias in Tech
EuroPython Conference via YouTube We Can Get More from Spatial, GIS, and Public Domain Datasets
EuroPython Conference via YouTube Using NLP to Detect Knots in Protein Structures
EuroPython Conference via YouTube The Challenges of Doing Infra-As-Code Without "The Cloud"
EuroPython Conference via YouTube