Abstract Syntax Tree for Patching Code and Assessing Code Quality
Python's ast module is fantastic, we use it both to compile Python to Michelson[0], an assembly language for the Tezos blockchain, and Python to JavaScript[1]. However, for refactoring one might want to consider redbaron[2].[0] https://yourlabs.io/pyratzlabs/pymich
[1] https://yourlabs.io/oss/ryzom/#javascript
[2] https://redbaron.readthedocs.io/en/latest/