[Python-Dev] Sorry. No Release.
Ka-Ping Yee
ping@lfw.org
Mon, 3 Jul 2000 16:35:38 -0500 (CDT)
Eric S. Raymond wrote:
> WhitespaceError
Greg Ward wrote:
> How about TabError?
But what i'd really like is an IndentationError that shows
up whenever there's an indentation problem.
It doesn't even have to be its own class of error, i suppose,
as long as it gets indicated some way ("SyntaxError: invalid
indentation" would be fine). This response would be good for
all of the following situations:
>>> 3
File "<stdin>", line 1
3
^
SyntaxError: invalid syntax
>>> if 1:
... 3
File "<stdin>", line 2
3
^
SyntaxError: invalid syntax
>>> if 1:
... 3
... 4
inconsistent dedent
File "<stdin>", line 3
4
^
SyntaxError: invalid token
>>> if 1:
... if 2:
... 3
File "<stdin>", line 3
3
^
SyntaxError: invalid syntax
>>> if 1:
... if 2:
... 3
inconsistent dedent
File "<stdin>", line 3
3
^
SyntaxError: invalid token
>>> if 1:
... if 2:
... 3
... 4
inconsistent dedent
File "<stdin>", line 4
4
^
SyntaxError: invalid token
-- ?!ng