From d22ca015fa0299c3bce84fca44edda55b8b52c4c Mon Sep 17 00:00:00 2001 From: jarrodcolburn Date: Wed, 30 Nov 2022 11:37:31 -0600 Subject: [PATCH 1/2] Fix: typo (Indention) Example needed to be indented. Was trying to call a context manger `pr` (from ` with cProfile.Profile() as pr:`) wot perform ` pr.print_stats()` once it had already exited. --- Doc/library/profile.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 2d95096f4cb83a..8aa9bbb800de44 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -274,7 +274,7 @@ functions: with cProfile.Profile() as pr: # ... do something ... - pr.print_stats() + pr.print_stats() .. versionchanged:: 3.8 Added context manager support. From c4f41ab4306682c2ee397b692ded664804987766 Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Mon, 12 Dec 2022 17:47:49 +0530 Subject: [PATCH 2/2] Update Doc/library/profile.rst Co-authored-by: Alex Waygood --- Doc/library/profile.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 8aa9bbb800de44..c2189e02656c7a 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -274,7 +274,7 @@ functions: with cProfile.Profile() as pr: # ... do something ... - pr.print_stats() + pr.print_stats() .. versionchanged:: 3.8 Added context manager support.