diff options
author | Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com> | 2023-11-10 13:32:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 13:32:36 (GMT) |
commit | d61313bdb1eee3e4bb111e0b248ac2dbb48be917 (patch) | |
tree | c5cff2f6ee3ab3d8350127adfea5834964c11d47 /Doc/library/contextlib.rst | |
parent | 64fea3211d08082236d05c38ee728f922eb7d8ed (diff) | |
download | cpython-d61313bdb1eee3e4bb111e0b248ac2dbb48be917.zip cpython-d61313bdb1eee3e4bb111e0b248ac2dbb48be917.tar.gz cpython-d61313bdb1eee3e4bb111e0b248ac2dbb48be917.tar.bz2 |
gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910)
Diffstat (limited to 'Doc/library/contextlib.rst')
-rw-r--r-- | Doc/library/contextlib.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 66b9c13..f6ebbfa 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -304,15 +304,15 @@ Functions and classes provided: This context manager is :ref:`reentrant <reentrant-cms>`. - If the code within the :keyword:`!with` block raises an - :exc:`ExceptionGroup`, suppressed exceptions are removed from the + If the code within the :keyword:`!with` block raises a + :exc:`BaseExceptionGroup`, suppressed exceptions are removed from the group. If any exceptions in the group are not suppressed, a group containing them is re-raised. .. versionadded:: 3.4 .. versionchanged:: 3.12 ``suppress`` now supports suppressing exceptions raised as - part of an :exc:`ExceptionGroup`. + part of an :exc:`BaseExceptionGroup`. .. function:: redirect_stdout(new_target) |