We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5256e7 commit 9b938c7Copy full SHA for 9b938c7
Doc/c-api/code.rst
@@ -185,9 +185,10 @@ bound into a function.
185
(including whether a callback is invoked or not), it does not change
186
the semantics of the Python code being executed.
187
188
- If the callback returns with an exception set, it must return ``-1``; this
189
- exception will be printed as an unraisable exception using
190
- :c:func:`PyErr_WriteUnraisable`. Otherwise it should return ``0``.
+ If the callback sets an exception, it must return ``-1``; this exception will
+ be printed as an unraisable exception using :c:func:`PyErr_WriteUnraisable`.
+ Otherwise (including if an exception was already set on entry to the
191
+ callback) it should return ``0``.
192
193
.. versionadded:: 3.12
194
0 commit comments