mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
[3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480)
(cherry picked from commit 87272b70f1
)
Co-authored-by: MapleCCC <littlelittlemaple@gmail.com>
This commit is contained in:
parent
d0991e2db3
commit
6563ea5c60
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue