[issue40246] Different error messages for same error - invalid string prefixes
Guido van Rossum
report at bugs.python.org
Sat Apr 11 11:13:24 EDT 2020
Guido van Rossum <guido at python.org> added the comment:
yes
On Sat, Apr 11, 2020 at 04:46 Lysandros Nikolaou <report at bugs.python.org>
wrote:
>
> Lysandros Nikolaou <lisandrosnik at gmail.com> added the comment:
>
> I have working code that checks if there is a quotation mark right after
> an identifier. Here is an example:
>
> ╰─ ./python
> Python 3.9.0a5+ (heads/pegen-dirty:502dfb719e, Apr 11 2020, 14:43:12)
> [GCC 9.2.1 20191008] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> ur''
> File "<stdin>", line 1
> ur''
> ^
> SyntaxError: invalid string prefix
>
> One observation about this is that it has precedence over an EOL error:
>
> >>> ur'
> File "<stdin>", line 1
> ur'
> ^
> SyntaxError: invalid string prefix
>
> Would that be acceptable?
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue40246>
> _______________________________________
>
--
--Guido (mobile)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40246>
_______________________________________
More information about the Python-bugs-list
mailing list