mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
PEP 415: Implement suppression of __context__ display with an exception attribute
This replaces the original PEP 409 implementation. See #14133.
This commit is contained in:
parent
d91dc62379
commit
d5a1c44455
12 changed files with 80 additions and 79 deletions
|
@ -10,7 +10,8 @@ extern "C" {
|
|||
/* PyException_HEAD defines the initial segment of every exception class. */
|
||||
#define PyException_HEAD PyObject_HEAD PyObject *dict;\
|
||||
PyObject *args; PyObject *traceback;\
|
||||
PyObject *context; PyObject *cause;
|
||||
PyObject *context; PyObject *cause;\
|
||||
int suppress_context;
|
||||
|
||||
typedef struct {
|
||||
PyException_HEAD
|
||||
|
@ -114,7 +115,6 @@ PyAPI_FUNC(PyObject *) PyException_GetTraceback(PyObject *);
|
|||
/* Cause manipulation (PEP 3134) */
|
||||
PyAPI_FUNC(PyObject *) PyException_GetCause(PyObject *);
|
||||
PyAPI_FUNC(void) PyException_SetCause(PyObject *, PyObject *);
|
||||
PyAPI_FUNC(int) _PyException_SetCauseChecked(PyObject *, PyObject *);
|
||||
|
||||
/* Context manipulation (PEP 3134) */
|
||||
PyAPI_FUNC(PyObject *) PyException_GetContext(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue