New submission from Zack Weinberg:

I tripped over a couple of SyntaxError cases where the diagnostic caret is 
misplaced.

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

The caret should point to the capital W in 'While'.

    >>> for x in the range(10):
      File "<stdin>", line 1
        for x in the range(10):
                         ^
    SyntaxError: invalid syntax

The caret should point to the 'the'.

----------
messages: 236560
nosy: zwol
priority: normal
severity: normal
status: open
title: Misplaced diagnostic caret for some SyntaxErrors

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to