Skip to content

Commit 6125f07

Browse files
committed
Just change example, not text
1 parent 1189097 commit 6125f07

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,9 +2148,8 @@ and :c:data:`PyType_Type` effectively act as defaults.)
21482148
to be called before attempting to break reference cycles, ensuring
21492149
that it finds the object in a sane state.
21502150

2151-
:c:member:`~PyTypeObject.tp_finalize` should not mutate the current exception
2152-
status. Non-trivial finalizers should use :c:func:`PyErr_GetRaisedException`,
2153-
an example::
2151+
:c:member:`~PyTypeObject.tp_finalize` should not mutate the current exception status;
2152+
therefore, a recommended way to write a non-trivial finalizer is::
21542153

21552154
static void
21562155
local_finalize(PyObject *self)

0 commit comments

Comments
 (0)