Skip to content

Commit 42878e8

Browse files
miss-islingtonZeroIntensityStanFromIreland
authored
[3.14] gh-141004: Document PyExceptionInstance* APIs (GH-141301) (GH-141302)
gh-141004: Document `PyExceptionInstance*` APIs (GH-141301) (cherry picked from commit b5a0c72) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent a8b2730 commit 42878e8

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)