Skip to content
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

With Python 3.8, we can remove a lot of ast code #23

Open
ewjoachim opened this issue Oct 21, 2019 · 0 comments
Open

With Python 3.8, we can remove a lot of ast code #23

ewjoachim opened this issue Oct 21, 2019 · 0 comments

Comments

@ewjoachim
Copy link
Owner

From Python 3.8 release notes:

ast
AST nodes now have end_lineno and end_col_offset attributes, which give the precise location of the end of the node. (This only applies to nodes that have lineno and col_offset attributes.)
New function ast.get_source_segment() returns the source code for a specific AST node.

https://docs.python.org/3/whatsnew/3.8.html#ast

CodeLocator (https://github.com/peopledoc/raincoat/blob/master/raincoat/parse.py#L9) can be simplified for 3.8.

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

No branches or pull requests

1 participant