python-ast-explorer icon indicating copy to clipboard operation
python-ast-explorer copied to clipboard

Very nice, but I see a problem

Open artgoldberg opened this issue 4 years ago • 0 comments

print(astor.dump_tree(ast.parse('5*c * (-1 + d)', mode='eval'))) is

Expression(
    body=BinOp(left=BinOp(left=Num(n=5), op=Mult, right=Name(id='c')),
        op=Mult,
        right=BinOp(left=UnaryOp(op=USub, operand=Num(n=1)), op=Add, right=Name(id='d'))))

but I don't see the UnaryOp at https://python-ast-explorer.com.

artgoldberg avatar Dec 06 '20 22:12 artgoldberg