We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operator precedence is not being properly handled. A couple of examples:
>>> to_ast = lambda x:ast.parse(x, mode='eval') >>> codegen.to_source(to_ast( '(1+2)*3' )) '1 + 2 * 3'
1+2*3 = 7. (1+2)*3 = 9
1+2*3
7
(1+2)*3
9
>>> codegen.to_source(to_ast( '( "%s " % (sep,) ).join(foo)' )) "'%s ' % (sep,).join(foo)"
This is evaluated as '%s ' % ((sep,).join(foo)) because . is higher precedence than %
'%s ' % ((sep,).join(foo))
.
%
The text was updated successfully, but these errors were encountered:
The version of this at https://github.com/berkerpeksag/astor handles this properly.
Sorry, something went wrong.
No branches or pull requests
Operator precedence is not being properly handled. A couple of examples:
1+2*3
=7
.(1+2)*3
=9
This is evaluated as
'%s ' % ((sep,).join(foo))
because.
is higher precedence than%
The text was updated successfully, but these errors were encountered: