3 ms·
> get the AST (a data structure AFAIK)
how?
> get the AST (a data structure AFAIK)
how?
https://docs.python.org/3/library/ast.html https://docs.python.org/3/library/ast.html
ast.parse(inspect.getsource(func))
doesn't work in the python shell though.
You could also decompile the function's code object.