New submission from Pablo Galindo Salgado <pablog...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue42997>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to