Skip to content

Commit 87272b7

Browse files
authored
bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428)
1 parent 39dd141 commit 87272b7

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
@@ -267,8 +267,9 @@ Functions and classes provided:
267267
.. function:: suppress(*exceptions)
268268

269269
Return a context manager that suppresses any of the specified exceptions
270-
if they occur in the body of a with statement and then resumes execution
271-
with the first statement following the end of the with statement.
270+
if they are raised in the body of a :keyword:`!with` statement and then
271+
resumes execution with the first statement following the end of the
272+
:keyword:`!with` statement.
272273

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

0 commit comments

Comments
 (0)