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
parser support for future import of unicode_strings #46729
Comments
This is a patch that modifies the parser to allow getting the future
The first approach is somewhat fragile and kinda breaks encapsulation. The second approach is probably a better long term solution, but adds |
I'll check it out today. |
I've carefully examined both version. I agree that from __future__ import egg, spam nor from __future__ import egg
from __future__ import spam The PyParser_ParseFileFlagsEx() is easier and more stable. I'll go with it. By the way I also like your name "unicode_strings". Should we stay with |
The flag should be named "unicode_literals" since that what changes. BTW: I'm not convinced that these future imports are all that useful - |
Working patch I had to introduce yet another PyParser Ex method for string parsing. I |
The patch actually isn't all that complicated - the main structural Being able to write significant pieces of code that run on both 2.6 and Also Christian - the posted patch accidentally included your hack to |
I'm still learning bzr. I just have figured out how to merge changes |
Slightly better patch
|
Christian checked this in a few days ago in r61953 and a few other |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: