Author serhiy.storchaka
Recipients aeros, gvanrossum, lys.nikolaou, pablogsal, serhiy.storchaka, vstinner
Date 2020-04-29.06:50:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588143026.33.0.131407604819.issue40246@roundup.psfhosted.org>
In-reply-to
Content
> It's no different from other edge cases where for some reason the space seems optional, like `1and 2`.

The parser is not consistent here. `0or[]` is an error, while `0and[]` and `1or[]` are valid. See https://mail.python.org/archives/list/python-dev@python.org/message/D2WPCITHG2LBQAP7DBTC6CY26WQUBAKP/

> 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 not help for `if'a'<=x<='z'`. And we will get more breakage when add more string prefixes.

We should either require a whitespace between an identifier and a string literal (with SyntaxWarning in meantime) or allow to omit it.
History
Date User Action Args
2020-04-29 06:50:26serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, vstinner, lys.nikolaou, pablogsal, aeros
2020-04-29 06:50:26serhiy.storchakasetmessageid: <1588143026.33.0.131407604819.issue40246@roundup.psfhosted.org>
2020-04-29 06:50:26serhiy.storchakalinkissue40246 messages
2020-04-29 06:50:26serhiy.storchakacreate