https://github.com/python/cpython/commit/c6e26ef881471a9d1b68e72e203b5d346a5f5f9a commit: c6e26ef881471a9d1b68e72e203b5d346a5f5f9a branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: ZeroIntensity <[email protected]> date: 2025-06-20T14:03:10Z summary:
[3.13] Docs: Document `PyExceptionClass` functions in the C API (GH-135697) (GH-135758) Docs: Document `PyExceptionClass` functions in the C API (GH-135697) * Docs: Document `PyExceptionClass_Name` `PyExceptionClass_Name` is an undocumented function in the limited API. * Document `PyExceptionClass_Check` (cherry picked from commit 59963e866a1bb8128a50cd53d1b13eeab03df06e) Co-authored-by: Yuki Kobayashi <[email protected]> files: M Doc/c-api/exceptions.rst diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index bb1339db140fb2..e7ae464b8918d8 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -749,6 +749,16 @@ Exception Classes .. versionadded:: 3.2 +.. c:function:: int PyExceptionClass_Check(PyObject *ob) + + Return non-zero if *ob* is an exception class, zero otherwise. This function always succeeds. + + +.. c:function:: const char *PyExceptionClass_Name(PyObject *ob) + + Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*. + + Exception Objects ================= _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
