Ammar Askar <am...@ammaraskar.com> added the comment:
Update: opened up https://github.com/python/cpython/pull/19303 as a quick first pass at implementing this. It works as expected and retains the context from the original exception just in case it's needed. The code isn't too pretty, looks like exception chaining was primarily designed to be a first class citizen using the `raise e2 from e` syntax. A helper in exceptions.c would definitely go a long way to making it more readable. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39865> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com