[issue42997] Improve error message for missing : before suites
Pablo Galindo Salgado
report at bugs.python.org
Thu Jan 21 20:20:05 EST 2021
New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:
Instead of displaying a generic syntax error:
Python 3.8.6 (default, Oct 10 2020, 18:31:21)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> for x in range
File "<stdin>", line 1
for x in range
^
SyntaxError: invalid syntax
>>>
we could display:
>>> for x in range
File "<stdin>", line 1
for x in range
^
SyntaxError: expected ':'
The same idea applies for every suite that has a missing ':'
----------
messages: 385463
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Improve error message for missing : before suites
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42997>
_______________________________________
More information about the Python-bugs-list
mailing list