Author aeros
Recipients aeros, gvanrossum, lys.nikolaou, pablogsal, serhiy.storchaka, vstinner
Date 2020-04-29.01:47:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588124822.67.0.373364738522.issue40246@roundup.psfhosted.org>
In-reply-to
Content
For addressing the backwards compatibility concern, I think we should just convert it to a SyntaxWarning for cases like the above to indicate that it's not really correct syntax, but not harmful enough to justify code breakage. I think it fits the documented description of SyntaxWarning well, which is to address "dubious syntax". 

Lysandros Nikolaou wrote:
> A possible solution would be to only emit a SyntaxError if the NAME directly preceding a STRING token contains one of the valid string prefixes (either one of 'f', 'r', 'u', 'b'). This would still output a nicer error message, but would not break code like the one of the example. What do you think about this?

That would certainly help to minimize the breakage, so I'd be in favor of that over a SyntaxError for all invalid prefixes. But, I'm not certain that it's additionally harmful if an invalid string prefix proceeds a valid one. Is there any additional harm, other than from a visual perspective?
History
Date User Action Args
2020-04-29 01:47:02aerossetrecipients: + aeros, gvanrossum, vstinner, serhiy.storchaka, lys.nikolaou, pablogsal
2020-04-29 01:47:02aerossetmessageid: <1588124822.67.0.373364738522.issue40246@roundup.psfhosted.org>
2020-04-29 01:47:02aeroslinkissue40246 messages
2020-04-29 01:47:02aeroscreate