From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Tue, 1 Jun 2021 21:58:06 +0000 (+0100) Subject: [3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480) X-Git-Tag: v3.10.0b3~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6563ea5c60be2e4896df52eff777aa93743f1551;p=thirdparty%2FPython%2Fcpython.git [3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480) (cherry picked from commit 87272b70f157af76cb14ff90d73dfc5d9bfb945a) Co-authored-by: MapleCCC --- diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 42834fe68bfa..98df29277e3b 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -267,8 +267,9 @@ Functions and classes provided: .. function:: suppress(*exceptions) Return a context manager that suppresses any of the specified exceptions - if they occur in the body of a with statement and then resumes execution - with the first statement following the end of the with statement. + if they are raised in the body of a :keyword:`!with` statement and then + resumes execution with the first statement following the end of the + :keyword:`!with` statement. As with any other mechanism that completely suppresses exceptions, this context manager should be used only to cover very specific errors where