re-entering in the normal flow after an exception is raised

Alex Martelli aleaxit at yahoo.com
Tue Sep 28 15:00:06 EDT 2004


Michele Simionato <michele.simionato at gmail.com> wrote:

> I think I want "re-entrant exceptions" (not sure if this is the
> correct name).

"resumable" is more common, I believe.

> Is there some elegant or hackish way to get this? 

I think not.  You may read in Stroustrup's book about C++'s design and
evolution how he was convinced to abandon resumable exceptions by
experiences in another language, where they just didn't pay for their
huge complexity -- they seem a good idea, but don't prove to be...
they're not used often enough to justify their complexity, in practice
(designing your software well enough that exceptions do not _need_
resumption isn't that big a deal).

If something is too complicated for C++, I would assume it's WAY too
complicated for Python.  So, I'm pretty happy Python's exceptions (like
C++'s, Java's, C#'s, ...) are non-resumable!


Alex



More information about the Python-list mailing list