This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients aroberge, gvanrossum, lys.nikolaou, pablogsal
Date 2021-05-21.12:15:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621599306.44.0.436250403333.issue44201@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-05-21 12:15:06pablogsalsetrecipients: + pablogsal, gvanrossum, aroberge, lys.nikolaou
2021-05-21 12:15:06pablogsalsetmessageid: <1621599306.44.0.436250403333.issue44201@roundup.psfhosted.org>
2021-05-21 12:15:06pablogsallinkissue44201 messages
2021-05-21 12:15:06pablogsalcreate