[issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")

Eric V. Smith report at bugs.python.org
Tue May 14 19:12:53 EDT 2019


Eric V. Smith <eric at trueblade.com> added the comment:

I agree with Mark: the string is being correctly interpreted by the AST parser, per Python's tokenizer rules.

You might want to look at lib2to3, which I think is also used by black. It's also possible that mypy or another static analyzer would be using some library you can leverage.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36911>
_______________________________________


More information about the Python-bugs-list mailing list