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

Guido van Rossum report at bugs.python.org
Fri Apr 10 18:56:13 EDT 2020


Guido van Rossum <guido at python.org> added the comment:

So a slightly shorter example uses ru''. This is an error because you can't combine the r prefix and the u prefix (in fact you can't combine anything with the r prefix).

I declare that this is a bug to report EOF here and the code should *first* check for a valid combination (e.g. fr'' or rf'') and only *then* try to distinguish between single and triple quotes.

----------

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


More information about the Python-bugs-list mailing list