正在加载图片...
Example:Python AST Dump 1 import ast 2 print(ast.dump(ast.parse("(1+2)*(3+4)"))) Output: 1 Module(body=[Expr(value=BinOp(left=BinOp(left=Constant(value=1,kind=None),op=Add(),right=Constant(value=2,kinc For a pretty-printed AST,try astdump'(https://pypi.org/project/astdump/)Example: Python AST Dump Output: For a pretty-printed AST, try astdump (https://pypi.org/project/astdump/) 1 import ast 2 print(ast.dump(ast.parse("(1+2)*(3+4)"))) 1 Module(body=[Expr(value=BinOp(left=BinOp(left=Constant(value=1, kind=None), op=Add(), right=Constant(value=2, kind ` `
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有