2013/7/16 Victor Stinner <victor.stinner at gmail.com>: > I would like to add assertions in Python/ceval.c to detect such bugs > earlier. The problem is that some functions rely on the ability to > call PyEval_EvalFrameEx() with an exception set. Is it expected? > Should it be avoided? The current exception can be replaced with a new > exception. Another example. Py_ReprLeave() function can be called while an exception is set. I'm not sure that it is "safe" to call new code while an exception is set. The function can raise a new exception. For example, PyList_SetSlice() can fail because of a MemoryError. I modified Py_ReprLeave() to save and then restore the current exception: http://hg.python.org/cpython/rev/28ff7ac91477 If Py_ReprLeave() raises a new exception, it is clears (replaced by the previous exception context). Victor
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