Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update the fast parser to work with Python 2.7 #1418

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

Merged
merged 4 commits into from
Apr 22, 2016

Conversation

ddfisher
Copy link
Collaborator

@ddfisher ddfisher commented Apr 20, 2016

Next step for #1353.

import typed_ast # type: ignore
from typed_ast import ast27 # type: ignore
from typed_ast import ast35 # type: ignore
from typed_ast import conversions # type: ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could provide stubs for these? The untypedness here kind of concerns me.

@gvanrossum
Copy link
Member

Mostly LGTM, would like your response to the review feedback so far.

Generic comment: maybe instead of changing every place that tests for StrExpr to now check for StrExpr or BytesExpr, perhaps those should be the same class with a flag field to distinguish the two? (And why isn't UnicodeExpr also included?)

@gvanrossum
Copy link
Member

If you rebase, the typeshed sync will be in and then maybe the tests will pass (or give useful info).

@ddfisher
Copy link
Collaborator Author

Build passed!

@ddfisher
Copy link
Collaborator Author

RE: StrExpr vs BytesExpr, I think it makes sense to keep them as-is because there's a separate Str vs Bytes in the Python 3 ast, which we'll hopefully be switching to soon.

@gvanrossum gvanrossum merged commit 930b07e into python:master Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants