[Python-checkins] [3.9] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26481)
iritkatriel
webhook-mailer at python.org
Tue Jun 1 18:15:56 EDT 2021
https://github.com/python/cpython/commit/9a688624973a2b753b84f892b65268543c7ff67d
commit: 9a688624973a2b753b84f892b65268543c7ff67d
branch: 3.9
author: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2021-06-01T23:15:48+01:00
summary:
[3.9] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26481)
(cherry picked from commit 87272b70f157af76cb14ff90d73dfc5d9bfb945a)
Co-authored-by: MapleCCC <littlelittlemaple at gmail.com>
files:
M Doc/library/contextlib.rst
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 3dcedf72a390e..cfc37a63aedbf 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -191,8 +191,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
More information about the Python-checkins
mailing list