New submission from theeshallnotknowethme <nohackingofkrow...@gmail.com>:
In the current version of CPython, this code: if datetime.now()strftime(...) != "19:50:00": return produces this error: File "<stdin>", line 4 if datetime.now()strftime(...) != "19:50:00": return ^^^^^^^^ SyntaxError: invalid syntax This is a potential attribute access, and this bug report proposes it would produce this error instead: File "<stdin>", line 4 if datetime.now()strftime(...) != "19:50:00": return ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a dot? Also, for string prefixes, this is the current error: >>> kf'dsdsfddsf' File "<stdin>", line 1 kf'dsdsfddsf' ^^^^^^^^^^^ SyntaxError: invalid syntax This bug report proposes this error instead: >>> kf'dsdsfddsf' File "<stdin>", line 1 kf'dsdsfddsf' ^^ SyntaxError: invalid string prefix 'kf' ---------- components: Parser messages: 407687 nosy: February291948, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Error messages for invalid string prefixes and potential attribute accesses versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45984> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com