5 May
2016
5 May
'16
2:17 a.m.
On Wed, May 4, 2016, 8:42 PM Nick Coghlan
@contextmanager def chain_errors(exc_to_raise): try: yield except Exception as e: raise exc_to_raise from e
Unfortunately, Kyle is using Python 2.7 still, so ``raise from`` won't help him. The exception context/cause is probably my favorite Python 3 feature. Or at least in my top 5.