> This could be done automatically, i.e. whenever you call > PyErr_SetString() etc. the currently active exception will be normalized > and put into a fourth global variable (exc_cause). In Python code > whenever a exception handler raises a new exception the exception > that is currently handled could be set as the cause for this > exception automatically by the raise statement. More globals of course defeat the purpose (one of the reasons for putting the traceback in the exception is to get rid of sys.exc_traceback). I also think that doing this automatically whenever PyErr_Set*() is called would cause a lot of spurious tracebacks. (Unless the idea is to skip the chaining if the original exception has an empty traceback; that will almost always be the case for exceptions raised at the C level.) I worry about backwards compatibility. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4