New submission from Miro Hrončok <m...@hroncok.cz>:

With Python 3.9.0a6 we get the following syntax error when bytecompiling the 
standard library in Fedora:


Compiling '/usr/lib64/python3.9/turtledemo/__main__.py'...
***   File "/usr/lib64/python3.9/turtledemo/__main__.py", line 275
    bg="#d00" if clear == NORMAL else"#fca")
                                    ^
SyntaxError: invalid string prefix


I've looked and the bad code is there for all branches, but only with 3.9.0a6 I 
get the SyntaxError.

I wonder whether this is a know new SyntaxError or not. This "worked" with 
3.9.0a5:

>>> "yes" if False else"no"
'no'

Happy to submit a PR for turtledemo.

----------
components: Demos and Tools
messages: 367575
nosy: hroncok, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40431>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to