[New-bugs-announce] [issue44324] add a "expected expression" syntax error

Arjun report at bugs.python.org
Sun Jun 6 16:38:43 EDT 2021


New submission from Arjun <ccldarjun at icloud.com>:

Recently, CPython got a new syntax error, "SyntaxError: expression expected after dictionary key and ':'". I propose to add a "expected expression" in general for consistency. I would like to have it changed for all the "equals" (e.g. PLUSEQUAL, MINEQUAL, etc). 


>>> x =
  File "<stdin>", line 1
    x =
        ^
SyntaxError: invalid syntax

Would be enhanced by:

>>> x +=
  File "<stdin>", line 1
    x =
         ^
SyntaxError: expected expression

----------
components: Parser
messages: 395213
nosy: CCLDArjun, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: add a "expected expression" syntax error
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44324>
_______________________________________


More information about the New-bugs-announce mailing list