Dev with Serdar
Learn coding in Python, Go and Rust from Serdar Yegulalp, software dev specialist and senior writer at InfoWorld.
Powerful Python source code processing with “ast”
Episode 193
Powerful Python source code processing with “ast”
Sep 10, 2024
9 mins
Overview
Python's "ast" module transforms the text of Python source code into an object stream. It's a more powerful way to walk through Python code, analyze its components, and make changes than working manually with code as text. This video shows some basic "ast" techniques, like selectively replacing imports and performing other targeted modifications to code.