abstract syntax tree - Python ast and inspect.getsource() -


how can 1 make ast tree inspectable inspect.getsource()

exec(compile(create_module(...), 'foo.py', 'exec')) print(inspect.getsource(obj.instance.method)) 

inspect.getsource() returns newline terminated string.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -