Python needs better error reporting
Tim Peters
tim.one at comcast.net
Sat Jun 29 00:22:08 EDT 2002
>>> "Syntax Error: invalid syntax" isn't very informative, yet it's
>>> tossed out frequently. HOW is the syntax invalid? For example:
>>> if s == ' '
>> That is supposed to start a new block so it should be
>> if s == ' ':
> That's not the point - I know that.
Or, IOW, SyntaxError is all the clue you actually needed. If the parser
were to tell you what *it* thinks is wrong, it would be along the lines of
"the only arcs leading out of this state are 23, 167, and 528". Then you'd
really have a point <wink>.
More information about the Python-list
mailing list