[Python-Dev] Better SyntaxError messages

Ka-Ping Yee ping@lfw.org
Thu, 6 Jul 2000 10:30:05 -0700 (PDT)

On Wed, 5 Jul 2000, Greg Ward wrote:
> >     SyntaxError: expected indent
> >     SyntaxError: expected unindent

The "expected indent" message seems a little abrupt to me (does
it mean there's a problem because an indent is expected, or a
problem with an indent that was expected, or a problem because
an expected indent isn't there?) so i have changed it to

    SyntaxError: expected an indented block

The latter case, "expected unindent", never occurs -- it is
always okay to continue an indented block, so a DEDENT is never
absolutely required.

The rest of the messages now say "unindent" instead of "dedent".

I've updated the patch.

-- ?!ng

"To be human is to continually change.  Your desire to remain as you are
is what ultimately limits you."
    -- The Puppet Master, Ghost in the Shell