mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
gh-141004: Document PyExceptionInstance* APIs (GH-141301)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
parent
8dd8498286
commit
b5a0c72492
1 changed files with 11 additions and 0 deletions
|
|
@ -788,6 +788,17 @@ Exception Classes
|
|||
Exception Objects
|
||||
=================
|
||||
|
||||
.. c:function:: int PyExceptionInstance_Check(PyObject *op)
|
||||
|
||||
Return true if *op* is an instance of :class:`BaseException`, false
|
||||
otherwise. This function always succeeds.
|
||||
|
||||
|
||||
.. c:macro:: PyExceptionInstance_Class(op)
|
||||
|
||||
Equivalent to :c:func:`Py_TYPE(op) <Py_TYPE>`.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyException_GetTraceback(PyObject *ex)
|
||||
|
||||
Return the traceback associated with the exception as a new reference, as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue