Author vstinner
Recipients gvanrossum, lys.nikolaou, pablogsal, serhiy.storchaka, vstinner
Date 2020-04-29.00:17:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588119426.6.0.0375929175159.issue40246@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-04-29 00:17:06vstinnersetrecipients: + vstinner, gvanrossum, serhiy.storchaka, lys.nikolaou, pablogsal
2020-04-29 00:17:06vstinnersetmessageid: <1588119426.6.0.0375929175159.issue40246@roundup.psfhosted.org>
2020-04-29 00:17:06vstinnerlinkissue40246 messages
2020-04-29 00:17:06vstinnercreate