This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients alonho, ncoghlan
Date 2012-06-01.01:11:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338513093.21.0.350724186564.issue14969@psf.upfronthosting.co.za>
In-reply-to
Content
Electronic contributor forms are actually on the PSF wishlist. We'll get there some day (maybe after the website update).

Getting back to the problem at hand, I think you might be on to something with the idea of exploiting PEP 409 to handle this. Specifically, where we reraise a caught exception when there are no exception details active, we should be able to replace the bare raise with something like:

    # A containing with statement will automatically add the exception
    # context back in after it gets suppressed. Avoid displaying it.
    if suppressed_exc and exc_details == (None, None, None):
        raise exc from None
    raise

That way, the exception *display* of escaping exceptions will still match that of nested with statements, even though the attributes are subtly different (__suppress_context__ being set to True, rather than __context__ being None)
History
Date User Action Args
2012-06-01 01:11:33ncoghlansetrecipients: + ncoghlan, alonho
2012-06-01 01:11:33ncoghlansetmessageid: <1338513093.21.0.350724186564.issue14969@psf.upfronthosting.co.za>
2012-06-01 01:11:32ncoghlanlinkissue14969 messages
2012-06-01 01:11:31ncoghlancreate