[Python-checkins] Fix: typo (Indention) (GH-99904)

miss-islington webhook-mailer at python.org
Mon Dec 12 07:25:28 EST 2022


https://github.com/python/cpython/commit/8711b59f7ac1803307d340e357e025043fbe2f39
commit: 8711b59f7ac1803307d340e357e025043fbe2f39
branch: main
author: jarrodcolburn <jcourtlandcolburn at gmail.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-12-12T04:25:22-08:00
summary:

Fix: typo (Indention) (GH-99904)



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.

Automerge-Triggered-By: GH:AlexWaygood

files:
M Doc/library/profile.rst

diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst
index 2d95096f4cb8..c2189e02656c 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.



More information about the Python-checkins mailing list