File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -1391,18 +1391,16 @@ always available.
1391
1391
its return value is not used, so it can simply return ``None ``. Error in the profile
1392
1392
function will cause itself unset.
1393
1393
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
+
1394
1399
Profile functions should have three arguments: *frame *, *event *, and
1395
1400
*arg *. *frame * is the current stack frame. *event * is a string: ``'call' ``,
1396
1401
``'return' ``, ``'c_call' ``, ``'c_return' ``, or ``'c_exception' ``. *arg * depends
1397
1402
on the event type.
1398
1403
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
-
1406
1404
The events have the following meaning:
1407
1405
1408
1406
``'call' ``
@@ -1424,6 +1422,9 @@ always available.
1424
1422
``'c_exception' ``
1425
1423
A C function has raised an exception. *arg * is the C function object.
1426
1424
1425
+ .. audit-event :: sys.setprofile "" sys.setprofile
1426
+
1427
+
1427
1428
.. function :: setrecursionlimit(limit)
1428
1429
1429
1430
Set the maximum depth of the Python interpreter stack to *limit *. This limit
You can’t perform that action at this time.
0 commit comments