Issue 1445739: New with semantics (original) (raw)

Here's a patch that implements the new with statement semantics: if exit got passed an exception, it is only swallowed when exit returns true. So it is no longer necessary for exit handlers to re-raise the exception.

This is a bit rough still -- existing unit tests have been adjusted, but there should be additional unit tests for the new functionality. Also the re-raise code in various exit handlers coded in the previous patch could be removed (note that re-raising doesn't do any harm -- it's just not necessary).