Skip to content

Very nice, but I see a problem #6

@artgoldberg

Description

@artgoldberg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions