[New-bugs-announce] [issue43822] Improve syntax errors for missing commas

Pablo Galindo Salgado report at bugs.python.org
Mon Apr 12 21:30:43 EDT 2021


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

Given that is quite common to forgot a comma in containers, function calls, ...etc and that the current error is:

>>> [a, b, c d]
  File "<stdin>", line 1
    [a, b, c d]
             ^
SyntaxError: invalid syntax

We could improve the user experience quite a lot if we mention that probably the user forgot a comma:

>>> [a, b, c d]
  File "<stdin>", line 1
    [a, b, c d]
             ^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

----------
messages: 390916
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Improve syntax errors for missing commas

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


More information about the New-bugs-announce mailing list