Skip to content

Commit 9a68862

Browse files
[3.9] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26481)
(cherry picked from commit 87272b7) Co-authored-by: MapleCCC <[email protected]>
1 parent 46b16d0 commit 9a68862

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/contextlib.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@ Functions and classes provided:
191191
.. function:: suppress(*exceptions)
192192

193193
Return a context manager that suppresses any of the specified exceptions
194-
if they occur in the body of a with statement and then resumes execution
195-
with the first statement following the end of the with statement.
194+
if they are raised in the body of a :keyword:`!with` statement and then
195+
resumes execution with the first statement following the end of the
196+
:keyword:`!with` statement.
196197

197198
As with any other mechanism that completely suppresses exceptions, this
198199
context manager should be used only to cover very specific errors where

0 commit comments

Comments
 (0)