Re:Abstract Syntax Tree for Patching Code and Assessing Code...
by 1nj3ct0r on Monday June 07, 2021 @03:01AM
(#27419835)
I hope it's better to use the 2to3 machinery as everyone said in comments
Here 2to3 machinery doc -> https://docs.python.org/3.9/library/2to3.html
[ Parent
| on HN ]
Re:Abstract Syntax Tree for Patching Code and Assessing Code...
by punnerud on Monday June 07, 2021 @05:17AM
(#27420552)
Isn't 2to3 only for converting Python2 to Python3 code? Could possibly be used for code replacement in Python3, but does not seem like that is the purpose. From the bottom of the page on your link: "The lib2to3 module may be removed from the standard library in a future Python version."