]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428)
authorMapleCCC <littlelittlemaple@gmail.com>
Tue, 1 Jun 2021 20:15:30 +0000 (04:15 +0800)
committerGitHub <noreply@github.com>
Tue, 1 Jun 2021 20:15:30 +0000 (21:15 +0100)
Doc/library/contextlib.rst

index 42834fe68bfaeef94ac8b57ea79cd6724d1461c6..98df29277e3b7d313cde2fe42b602dc22610a649 100644 (file)
@@ -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