[Python-Dev] SyntaxError patches

Ka-Ping Yee ping@lfw.org
Tue, 11 Jul 2000 10:31:59 -0700 (PDT)


On Tue, 11 Jul 2000, Fred L. Drake, Jr. wrote:
> At one point, we were discussing having specializations of
> SyntaxError, and I posted a patch that defined IndentationError and
> TabError.

I guess the question is, will we ever want to catch or distinguish
just IndentationError or TabError exceptions in particular from
within a Python program?

I can't personally think of any situations where i would need more
detail than SyntaxError (whatever the error is, i'll just want to
say "syntax error" and show the message)... unless... should the
expected token type be passed *all* the way back to the user level
so that e.g. an IDE can provide a UI hint as to how to correct the
syntax error?


-- ?!ng