Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,12 @@ Querying the error indicator
.. c:function:: void PyErr_SetRaisedException(PyObject *exc)

Set *exc* as the exception currently being raised,
clearing the existing exception if one is set.
clearing the existing exception if one is set. If *exc* is ``NULL``,
just clear the existing exception.

.. warning::
.. note::

This call ":term:`steals <steal>`" a reference to *exc*,
which must be a valid exception.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line is helpful. We should just say "must be a valid exception or NULL".

This call ":term:`steals <steal>`" a reference to *exc*.

.. versionadded:: 3.12

Expand Down
Loading