
June 28, 2017
3:51 p.m.
On Wed, Jun 28, 2017 at 12:25:12PM +1000, Nick Coghlan wrote: [...]
So while I prefer "contextlib.convert_exception" as the name (rather than the "exception_guard" Steven used in his recipe), I'd definitely be open to a bugs.python.org RFE and a PR against contextlib to add such a construct to Python 3.7.
http://bugs.python.org/issue30792 -- Steve