[issue40246] Different error messages for same error - invalid string prefixes

Pablo Galindo Salgado report at bugs.python.org
Wed Apr 29 15:11:47 EDT 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> What's also possible is to handle keywords at tokenizer level

Sadly, the tokenizer is unaware of keywords (maybe except async and await because their history as soft keywords) as that distinction usually is up to the parser as the parser is the one who knows about the grammar. Introducing keywords in the tokenizer would couple them too much IMHO apart from other possible problems.

----------

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


More information about the Python-bugs-list mailing list