Dive into a comprehensive exploration of Python's abstract syntax tree (AST) ecosystem in this 47-minute conference talk from EuroPython 2018. Gain insights into practical applications of AST in static analysis and metaprogramming, starting with a conceptual overview and Python's introspection capabilities. Discover tools for AST visualization, creation, and transformation to source code. Learn how to leverage AST for static analysis using built-in facilities and third-party tools, comparing their advantages to other static analysis methods. Explore AST manipulation and metaprogramming techniques, focusing on practical applications such as domain-specific languages, runtime code manipulation, and assertion rewriting. By the end, acquire a solid understanding of AST problem-solving capabilities, existing tooling, and resources for developing custom AST tools.
Overview
Syllabus
Chase Stevens - Exploring the Python AST Ecosystem
Taught by
EuroPython Conference