Nick Coghlan <ncogh...@gmail.com> added the comment:

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)

----------
title: Restore sys.exc_clear()? -> Use __suppress_context__ in 
contextlib.ExitStack.__exit__

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14969>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to