Python needs better error reporting

David LeBlanc whisper at oz.net
Tue Jul 2 15:44:42 EDT 2002


> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Fredrik Lundh
> Sent: Tuesday, July 02, 2002 12:24
> To: python-list at python.org
> Subject: Re: Python needs better error reporting
>
>
> Hans-Joachim Widmaier wrote:
>
> > Instead of listing all the legitimate tokens that may follow, why not
> > just give something like "Incomplete 'if' statement?"
>
> of course, if you bother to read the *entire* error message,
> that's not too far from what it says today:
>
>       File "<stdin>", line 1
>         if s == ""
>                  ^
>     SyntaxError: invalid syntax
>
> (and the fact that your typical Python autoindenter
> refuses to indent the next line if you leave out the
> colon may also help; I usually discover mistakes like
> this long before I run the code...)
>
> </F>

Except that everything to the left of the circumflex is syntactically
correct.

Dave LeBlanc
Seattle, WA USA






More information about the Python-list mailing list