New submission from Irit Katriel <iritkatr...@gmail.com>:

Following the removal of exc_type and exc_traceback from the interpreter's 
active exception in issue45711, we can now provide simplified get-set functions 
in the C Api:

PyAPI_FUNC(void) PyErr_GetActiveException(PyObject **);
PyAPI_FUNC(void) PyErr_SetActiveException(PyObject *);

as alternatives to 

PyAPI_FUNC(void) PyErr_GetExcInfo(PyObject **, PyObject **, PyObject **);
PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);

See also issue46328 re the corresponding change in the sys module.

----------
assignee: iritkatriel
components: C API, Interpreter Core
messages: 410299
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Add PyErr_GetActiveException and PyErr_SetActiveException
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to