New submission from Pablo Galindo Salgado <[email protected]>:
The current indentation error is quite simplistic and it does not include the
context of the statement that was associated with the indented block and where
it was:
>>> def foo():
... if lel:
... x = 2
File "<stdin>", line 3
x = 2
^
IndentationError: expected an indented block
we can improve the error by adding some context:
>>> def foo():
... if lel:
... x = 2
File "<stdin>", line 3
x = 2
^
IndentationError: expected an indented block after if statement in line 2
----------
messages: 391160
nosy: ammar2, pablogsal
priority: normal
severity: normal
status: open
title: Improve syntax error for indentation errors
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43859>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com