Skip to content

Commit b0852d7

Browse files
author
Quentin Peter
committed
Apply suggestions
1 parent 349a5f9 commit b0852d7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Doc/library/sys.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,18 +1391,16 @@ always available.
13911391
its return value is not used, so it can simply return ``None``. Error in the profile
13921392
function will cause itself unset.
13931393

1394+
.. note::
1395+
The same tracing mechanism is used for :func:`!setprofile` as :func:`settrace`.
1396+
To trace calls with :func:`!setprofile` inside a tracing function
1397+
(e.g. in a debugger breakpoint), see :func:`call_tracing`.
1398+
13941399
Profile functions should have three arguments: *frame*, *event*, and
13951400
*arg*. *frame* is the current stack frame. *event* is a string: ``'call'``,
13961401
``'return'``, ``'c_call'``, ``'c_return'``, or ``'c_exception'``. *arg* depends
13971402
on the event type.
13981403

1399-
.. note::
1400-
The same tracing mechanism is used for :func:`!setprofile` as :func:`settrace`.
1401-
To trace calls with :func:`!setprofile` inside a tracing function (e.g. in a
1402-
debugger breakpoint) see :func:`call_tracing`.
1403-
1404-
.. audit-event:: sys.setprofile "" sys.setprofile
1405-
14061404
The events have the following meaning:
14071405

14081406
``'call'``
@@ -1424,6 +1422,9 @@ always available.
14241422
``'c_exception'``
14251423
A C function has raised an exception. *arg* is the C function object.
14261424

1425+
.. audit-event:: sys.setprofile "" sys.setprofile
1426+
1427+
14271428
.. function:: setrecursionlimit(limit)
14281429

14291430
Set the maximum depth of the Python interpreter stack to *limit*. This limit

0 commit comments

Comments
 (0)