> The explanation seems to be that, while exc_info is cleared immediately, the > thread state exception fields are only cleaned up at the end of > PyEval_EvalFrameEx. Patch and test in http://bugs.python.org/issue2507