Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/python3.14/internal/pycore_exceptions.h
1 #ifndef Py_INTERNAL_EXCEPTIONS_H 2 #define Py_INTERNAL_EXCEPTIONS_H 3 #ifdef __cplusplus 4 extern "C" { 5 #endif 6 7 #ifndef Py_BUILD_CORE 8 # error "this header requires Py_BUILD_CORE define" 9 #endif 10 11 12 /* runtime lifecycle */ 13 14 extern PyStatus _PyExc_InitState(PyInterpreterState *); 15 extern PyStatus _PyExc_InitGlobalObjects(PyInterpreterState *); 16 extern int _PyExc_InitTypes(PyInterpreterState *); 17 extern void _PyExc_Fini(PyInterpreterState *); 18 19 20 /* other API */ 21 22 struct _Py_exc_state { 23 // The dict mapping from errno codes to OSError subclasses 24 PyObject *errnomap; 25 PyBaseExceptionObject *memerrors_freelist; 26 int memerrors_numfree; 27 #ifdef Py_GIL_DISABLED 28 PyMutex memerrors_lock; 29 #endif 30 // The ExceptionGroup type 31 PyObject *PyExc_ExceptionGroup; 32 }; 33 34 extern void _PyExc_ClearExceptionGroupType(PyInterpreterState *); 35 36 37 #ifdef __cplusplus 38 } 39 #endif 40 #endif /* !Py_INTERNAL_EXCEPTIONS_H */