Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
No, this issue is in the parser while the other is caused by the code module. As I mentioned, this case doesn't ask you for tokens until you close the brace, it just ask you for one extra token because is doing a lookahead. If you give any extra token to satisfy the lookahead: >>> foo[x = 1 $ File "<stdin>", line 1 foo[x = 1 $ ^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? >>> It fails immediately even if you didn't close the bracket ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44201> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com