Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
> 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-...@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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40246> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com