8000 gh-91345: Talk about ``sys._getframe`` compatibility in 3.11 whatsnew… · python/cpython@1e4cdcf · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e4cdcf

Browse files
gh-91345: Talk about sys._getframe compatibility in 3.11 whatsnew (GH-92552)
(cherry picked from commit be3cdd6) Co-authored-by: Ken Jin <kenjin4096@gmail.com>
1 parent 2505e22 commit 1e4cdcf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -891,10 +891,11 @@ holds execution information. The following are new frame optimizations:
891891
- Streamlined the internal frame struct to contain only essential information.
892892
Frames previously hel 8026 d extra debugging and memory management information.
893893

894-
Old-style frame objects are now created only when required by debuggers. For
895-
most user code, no frame objects are created at all. As a result, nearly all
896-
Python functions calls have sped up significantly. We measured a 3-7% speedup
897-
in pyperformance.
894+
Old-style frame objects are now created only when requested by debuggers or
895+
by Python introspection functions such as ``sys._getframe`` or
896+
``inspect.currentframe``. For most user code, no frame objects are
897+
created at all. As a result, nearly all Python functions calls have sped
898+
up significantly. We measured a 3-7% speedup in pyperformance.
898899

899900
(Contributed by Mark Shannon in :issue:`44590`.)
900901

0 commit comments

Comments
 (0)
0