Matthew J Desmarais The ast module in the Python (>= 2.6) standard library provides a representation of python code in a python data structure. We'll begin with a discussion about what an abstract syntax tree is and why it's useful. We can then talk about what's available in the ast module, how it works, and how you can use it. This will be a practical session built around examples examining and modifying live ASTs.
PyCon is an activity of the Python Software Foundation, a 501c3 non-profit organization. To support future conferences, please donate to the Foundation at www.python.org/psf/donations . Video and audio material from PyCon are licensed under the Creative Commons CC-BY-NC-SA license . This means you can incorporate excerpts or entire recordings in your own non-commercial projects, as long as you credit the speaker and you CC-license the finished project.