gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback (#102779)

This commit is contained in:
Irit Katriel
2023-03-18 11:47:11 +00:00
committed by GitHub
parent 039714d00f
commit e1e9bab006
22 changed files with 103 additions and 36 deletions

View File

@@ -1304,7 +1304,7 @@ finalize_modules_delete_special(PyThreadState *tstate, int verbose)
{
// List of names to clear in sys
static const char * const sys_deletes[] = {
"path", "argv", "ps1", "ps2",
"path", "argv", "ps1", "ps2", "last_exc",
"last_type", "last_value", "last_traceback",
"__interactivehook__",
// path_hooks and path_importer_cache are cleared