File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -144,9 +144,10 @@ Context object management functions:
144
144
Any pending exception is cleared before the callback is called and restored
145
145
after the callback returns.
146
146
147
- If the callback returns with an exception set, it must return ``-1 ``; this
148
- exception will be printed as an unraisable exception using
149
- :c:func: `PyErr_FormatUnraisable `. Otherwise it should return ``0 ``.
147
+ If the callback raises an exception it must return ``-1 ``; the exception
148
+ will be printed as an unraisable exception using
149
+ :c:func: `PyErr_FormatUnraisable ` and discarded. Otherwise it must return
150
+ ``0 ``.
150
151
151
152
.. versionadded :: 3.14
152
153
Original file line number Diff line number Diff line change @@ -52,8 +52,9 @@ typedef enum {
52
52
* Any pending exception is cleared before the callback is called and restored
53
53
* after the callback returns.
54
54
*
55
- * if the callback returns with an exception set, it must return -1. Otherwise
56
- * it should return 0
55
+ * If the callback raises an exception it must return -1; the exception will be
56
+ * printed as an unraisable exception using PyErr_FormatUnraisable and
57
+ * discarded. Otherwise it must return 0.
57
58
*/
58
59
typedef int (* PyContext_WatchCallback )(PyContextEvent , PyObject * );
59
60
You can’t perform that action at this time.
0 commit comments