From f30ad65dbf3c6b1b5eec14dc954d65ef32327857 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Sat, 23 Oct 2021 00:13:46 +0100 Subject: bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes (GH-28569) --- Include/pyerrors.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Include/pyerrors.h') diff --git a/Include/pyerrors.h b/Include/pyerrors.h index c6c443a2d7..77d791427d 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -60,11 +60,14 @@ PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *); #define PyExceptionInstance_Class(x) ((PyObject*)Py_TYPE(x)) +#define _PyBaseExceptionGroup_Check(x) \ + PyObject_TypeCheck(x, (PyTypeObject *)PyExc_BaseExceptionGroup) /* Predefined exceptions */ PyAPI_DATA(PyObject *) PyExc_BaseException; PyAPI_DATA(PyObject *) PyExc_Exception; +PyAPI_DATA(PyObject *) PyExc_BaseExceptionGroup; #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 PyAPI_DATA(PyObject *) PyExc_StopAsyncIteration; #endif -- cgit v1.2.1