[Python-Dev] Why aren't escape sequences in literal strings handled by the tokenizer? (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 18 04:09:56 EDT 2018


Eric V. Smith wrote:

I assume the intent is to not throw away any information in the lexer, and give the parser full access to the original string. But that's just a guess.

More likely it's because the lexer is fairly dumb and can basically just recognise regular expressions.

-- Greg



More information about the Python-Dev mailing list