Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Irit Katriel <[email protected]>
  • Loading branch information
ambv and iritkatriel authored Apr 24, 2023
commit a43ffe46e7e6e527be9bd115bfe81d68087049ca
3 changes: 1 addition & 2 deletions Doc/library/contextlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ Functions and classes provided:

If the code within the :keyword:`!with` block raises an
:exc:`ExceptionGroup`, suppressed exceptions are removed from the
group. If any others are left, the modified group is re-raised.
Otherwise, the exception group is empty and so nothing is raised.
group. If any exceptions in the group are not suppressed, a group containing them is re-raised.

.. versionadded:: 3.4

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:class:`contextlib.suppress` now supports suppressing exceptions raised as
part of an :exc:`ExceptionGroup`. If other exceptions exist on the group, it
is now re-raised without the suppressed ones.
part of an :exc:`ExceptionGroup`. If other exceptions exist on the group, they
are re-raised in a group that does not contain the suppressed exceptions.