Refactoring Code with the Standard Library @NorthBayPython
Refactoring Code with the Standard Library  @NorthBayPython
Uploaded November 2018 | Updated September 2026, 1 day ago
John Reese

2018.northbaypython.org/schedule/presentation/23

Python includes a concrete syntax tree (CST) in the standard library, useful for mass refactoring code bases of all sizes. I'll walk through the differences between abstract and concrete syntax trees (AST and CST), why a CST is useful for refactoring, and how you can build basic refactoring tools on top of a CST to modify your entire code base quickly and safely. Lastly, I'll demonstrate what's possible with these tools, including upgrading code to new interfaces, or wholesale movement of code between modules. This talk assumes a basic understanding of how Python works, but will otherwise provide enough context to be useful to those who haven't previously worked with syntax trees.

A Python conference north of the Golden Gate


North Bay Python is a single-track conference with a carefully curated set of talks representing the diverse Python community and their different areas of interest.

If a topic is less to your interest, or you've met some people you really want to sit down and chat with, we'll have plenty of areas away from the main theatre to catch up and chat.

Our goal is to keep prices as low as possible. That means we won't be catering lunch. Instead, you can look forward to extra-long lunch breaks you can use to explore all of the great food options around the venue.
Refactoring Code with the Standard LibraryPython, Government, and Contracts: providing a tool to investigate corruptionCrisis (Technical) Communication: Teaching Survival Skills You Didn’t Know... - Margaret Fero - 2026Back to the Future of Hypermedia in Python - Mario Munoz (North Bay Python 2023)Automate Your City Data with Python - Philip James (North Bay Python 2023)Hi! My name is...Hypothesis Levels Up: codegen, observability, fault localization, and a black-magic backendIt’s About Ethics in AI Alignment – Resistance in the Age of AI-Governed SpeechCall C code quickly and compatibly with CFFIBridges, or Benefits of Connecting Our Communities - Mario Munoz (Nbpy2024)Colossal Cave Adventure in PythonSome Assembly Required: Lessons from Lego, KNex, & Mario Kart - Jeremy Tanner (Nbpy2025)
North Bay Python |

Refactoring Code with the Standard Library

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER