-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improve source visitors #17
Conversation
Looks great. One thing though: When I run the code against cpython with your tester it crashes in cpython/Lib/test/pickletester.py when parsing a complex number. The method def visit_Num(self, node):
if isinstance(node.n, complex):
cond = node.n.real < 0
else:
cond = node.n < 0
with self.inside('(', ')', cond=cond):
self.write(repr(node.n)) Could you add a fix like this and also add a test with a complex number? Edit: I found out how to trigger the error in the tests. You can just add |
Bug should be fixed now, |
Thank you for your outstanding work! Maybe some day we will reach 100% an cpython :-) |
Pull request fixing remaining bugs from #11.
Add
.inside()
decorator for surrounding codeblock withwrites
.