Author pablogsal
Recipients pablogsal
Date 2021-04-13.02:05:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618279547.58.0.105219171129.issue43823@roundup.psfhosted.org>
In-reply-to
Content
Currently the error for invalid dict literals is generic:

>>> {1:2, 3:}
  File "<stdin>", line 1
    {1:2, 3:}
            ^
SyntaxError: invalid syntax
>>> {1:2, 3}
  File "<stdin>", line 1
    {1:2, 3}
           ^
SyntaxError: invalid syntax

We can have better errors for these cases, which can help with big dict literals:

>>> {1:2, 3}
  File "<stdin>", line 1
    {1:2, 3}
           ^
SyntaxError: ':' expected after dictionary key
>>> {1:2, 3:}
  File "<stdin>", line 1
    {1:2, 3:}
           ^
SyntaxError: expression expected after dictionary key and ':'
History
Date User Action Args
2021-04-13 02:05:47pablogsalsetrecipients: + pablogsal
2021-04-13 02:05:47pablogsalsetmessageid: <1618279547.58.0.105219171129.issue43823@roundup.psfhosted.org>
2021-04-13 02:05:47pablogsallinkissue43823 messages
2021-04-13 02:05:47pablogsalcreate