[issue40246] Different error messages for same error - invalid string prefixes
STINNER Victor
report at bugs.python.org
Tue Apr 28 20:17:06 EDT 2020
STINNER Victor <vstinner at python.org> added the comment:
I reopen the issue.
The following code works on Python 3.8, but fails with SyntaxError on Python 3.9.0a6 with the old and the new parser (see bpo-40431):
clear = "NORMAL"
print(dict(state=clear, bg="#d00" if clear else"#fca"))
Well, the code looks like a typo error... but it worked previously.
Not sure if we should keep the SyntaxError or not. Fixing the code is trivial: see PR 19777 attached to bpo-40431; replace >else"#fca"< with >else "#fca"<.
Note: I first reported the issue to https://bugs.python.org/issue40334#msg367580
----------
resolution: fixed ->
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40246>
_______________________________________
More information about the Python-bugs-list
mailing list