Exception - how to ignore it ?

Scott David Daniels scott.daniels at acm.org
Tue Jun 3 23:01:46 EDT 2003


Helmut Jarausch:
 >is it possible for an exception handler
 >to just e.g. print something and set some
 >global flags but then to have the script
 >continue just after the statement which
 >raised the exception?

I'd chime in on the "avoid the temptation" chorus, but they seem
in full voice.

Xerox Labs (PARC) had an implementation language name Mesa with
an exception system that allowed you to fiddle things and return
as well as ever return fro mthe exception.  So many bugs
were associated with that feature that they had a style
note that said, basically, "don't do that."  After a few years
of the style note, they looked through the codebase and found
(I am hazy here) either a small number of uses left, or a small
number of uses not easily rewritten.  At least a quarter of those
remaing beasties had bugs in them.  So, they rewrote them all and
pulled the language feature.

This is all by way of saying, "you aint gonna need it."

-Scott David Daniels
Scott.Daniels at Acm.Org





More information about the Python-list mailing list