Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cef17d8

Browse filesBrowse files
committed
gh-104232: Change sys.settrace docs to reflect actual behaviour
1 parent de7f694 commit cef17d8
Copy full SHA for cef17d8

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Open diff view settings
Collapse file

‎Doc/library/sys.rst‎

Copy file name to clipboardExpand all lines: Doc/library/sys.rst
+4-3Lines changed: 4 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1478,9 +1478,10 @@ always available.
14781478
function to be used for the new scope, or ``None`` if the scope shouldn't be
14791479
traced.
14801480

1481-
The local trace function should return a reference to itself (or to another
1482-
function for further tracing in that scope), or ``None`` to turn off tracing
1483-
in that scope.
1481+
The local trace function can return a reference to another function for
1482+
further tracing in that scope, or ``None`` to keep the current local trace
1483+
function active. To turn off tracing in this scope, the local trace function
1484+
can set ``frame.f_trace`` to ``None``.
14841485

14851486
If there is any error occurred in the trace function, it will be unset, just
14861487
like ``settrace(None)`` is called.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.