Skip to content

Commit b5a0c72

Browse files
pythongh-141004: Document PyExceptionInstance* APIs (pythonGH-141301)
Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 8dd8498 commit b5a0c72

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/c-api/exceptions.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,17 @@ Exception Classes
788788
Exception Objects
789789
=================
790790
791+
.. c:function:: int PyExceptionInstance_Check(PyObject *op)
792+
793+
Return true if *op* is an instance of :class:`BaseException`, false
794+
otherwise. This function always succeeds.
795+
796+
797+
.. c:macro:: PyExceptionInstance_Class(op)
798+
799+
Equivalent to :c:func:`Py_TYPE(op) <Py_TYPE>`.
800+
801+
791802
.. c:function:: PyObject* PyException_GetTraceback(PyObject *ex)
792803
793804
Return the traceback associated with the exception as a new reference, as

0 commit comments

Comments
 (0)