Skip to content

Commit

Permalink
bpo-36280: Add Constant.kind field (pythonGH-12295)
Browse files Browse the repository at this point in the history
The value is a string for string and byte literals, None otherwise.
It is 'u' for u"..." literals, 'b' for b"..." literals, '' for "..." literals.
The 'r' (raw) prefix is ignored.
Does not apply to f-strings.

This appears sufficient to make mypy capable of using the stdlib ast module instead of typed_ast (assuming a mypy patch I'm working on).

WIP: I need to make the tests pass. @ilevkivskyi @serhiy-storchaka 



https://bugs.python.org/issue36280
  • Loading branch information
gvanrossum authored and miss-islington committed Mar 13, 2019
1 parent 8b5bdda commit 10f8ce6
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 60 deletions.
7 changes: 4 additions & 3 deletions Include/Python-ast.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 10f8ce6

Please sign in to comment.