Perhaps I am not using the correct term, but I want to take a block of Python code (in Python), get a marker tree for the code, make some kind of modification and reassemble it in Python.
For example, consider this block of code:
def x(y):
b = 2
if y == b:
foo(y)
I would like to be able to accept this and programmatically do this:
def x(y):
b = 2
if y == b:
bar(y)
I cannot imagine that there is no library that does something like this. Thanks in advance.
EDIT
, . , , . . , , : Netflix, , . , , / .