summaryrefslogtreecommitdiffstats
path: root/Doc/library/contextlib.rst
diff options
context:
space:
mode:
authorMapleCCC <littlelittlemaple@gmail.com>2021-06-01 20:15:30 (GMT)
committerGitHub <noreply@github.com>2021-06-01 20:15:30 (GMT)
commit87272b70f157af76cb14ff90d73dfc5d9bfb945a (patch)
tree009aa88d03df71985b825e2556f0af24376d5100 /Doc/library/contextlib.rst
parent39dd141a4ba68bbb38fd00a65cdcff711acdafb5 (diff)
downloadcpython-87272b70f157af76cb14ff90d73dfc5d9bfb945a.zip
cpython-87272b70f157af76cb14ff90d73dfc5d9bfb945a.tar.gz
cpython-87272b70f157af76cb14ff90d73dfc5d9bfb945a.tar.bz2
bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428)
Diffstat (limited to 'Doc/library/contextlib.rst')
-rw-r--r--Doc/library/contextlib.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 42834fe..98df292 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