mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes (GH-28569)
This commit is contained in:
parent
4bc5473a42
commit
f30ad65dbf
16 changed files with 1366 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue