Skip to content

Commit 59963e8

Browse files
authored
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`
1 parent c825b5d commit 59963e8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/c-api/exceptions.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,16 @@ Exception Classes
749749
.. versionadded:: 3.2
750750
751751
752+
.. c:function:: int PyExceptionClass_Check(PyObject *ob)
753+
754+
Return non-zero if *ob* is an exception class, zero otherwise. This function always succeeds.
755+
756+
757+
.. c:function:: const char *PyExceptionClass_Name(PyObject *ob)
758+
759+
Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*.
760+
761+
752762
Exception Objects
753763
=================
754764

0 commit comments

Comments
 (0)