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
Don't use str.find #154
Don't use str.find #154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Could you share a reproducer? It would be nice to add a test case.
I ran into this issue when I created an ast node in Python 2 but set the name to a unicode. import astor
import ast
astor.to_source(ast.Name(id=u'copy', ctx=ast.Load())) |
Thanks! PR looks good to me. I'll convert your reproducer to a test case (feel free to do that if you have some spare time) and merge it. Test failure seems unrelated as I can see it fails in other PRs:
|
It doesn't work for unicodes in Python 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I've just added a test case and updated changelog.
Thank you and sorry for my late response! |
It doesn't work for unicodes in Python 2.