[Python-Dev] Better SyntaxError messages
Michael Hudson
mwh21@cam.ac.uk
Wed, 5 Jul 2000 14:17:49 +0100 (BST)
On Wed, 5 Jul 2000, Vladimir Marangozov wrote:
> Greg Wilson wrote:
> >
> > > On Wed, 5 Jul 2000, Vladimir Marangozov wrote:
> > > I'd remove the word "here" so that the error msg is self-contained.
> > > "expected indent" & "expected dedent" are fine.
> >
> > I just did a poll --- only 2 out of 5 programmers in my shouting radius
> > know what "dedent" means. Is there a more accessible way to phrase the
> > error message?
>
> Good point.
>
> Here's another suggestion:
>
> "expected indent" -> "missing expected indentation"
+0 - doesn't really change much does it?
> "expected dedent" -> "missing expected closing indentation"
Eugh. How about "expected decrease in indentation"? Though I think
dedent (or mabye outdent) is pretty obvious in context.
Also "decrease in indentation does not match any outer level"
is a pretty hefty error message.
Still, these things are so much better than the status quo that I'm about
+1e8 on the general idea...
Cheers,
Michael