New issue

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

Fix incorrect Binary Operation Code Generation #4

wants to merge 1 commit into


None yet
1 participant

jbremer commented Apr 8, 2013

Fixes the following sample code.

import ast
import codegen
import sys

eval(codegen.to_source(ast.parse('sys.stdout.write(("a" + "b")[:1])')))

As this currently eval()'s the following code.

sys.stdout.write('a' + 'b'[:1])


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment