From ee42f098cb219c68b12e72a7f1d30078d6d2a025 Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Tue, 2 May 2023 18:43:57 +0100 Subject: [PATCH 1/2] gh-104094: mention that the change is included in 3.11.4 and clarify except* documentation --- Doc/reference/compound_stmts.rst | 6 ++++-- Doc/whatsnew/3.12.rst | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index f0a8936c35bf4a..e84ff2aa70d634 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -362,8 +362,10 @@ one :keyword:`!except*` clause, the first that matches it. :: Any remaining exceptions that were not handled by any :keyword:`!except*` -clause are re-raised at the end, combined into an exception group along with -all exceptions that were raised from within :keyword:`!except*` clauses. +clause are re-raised at the end, along with all exceptions that were +raised from the within :keyword:`!except*` clauses. If this list contains +more than one exception to reraise, they are combined into an exception +group. If the raised exception is not an exception group and its type matches one of the :keyword:`!except*` clauses, it is caught and wrapped by an diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index a3fce7ccacf7c1..af82474a9dacca 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -239,7 +239,8 @@ Other Language Changes * When a ``try-except*`` construct handles the entire :exc:`ExceptionGroup` and raises one other exception, that exception is no longer wrapped in an - :exc:`ExceptionGroup`. (Contributed by Irit Katriel in :gh:`103590`.) + :exc:`ExceptionGroup`. Also changed in version 3.11.4. (Contributed by Irit + Katriel in :gh:`103590`.) New Modules From fde6ec516275c85776dc52588dbee2d8809cb9dd Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Tue, 2 May 2023 19:22:29 +0100 Subject: [PATCH 2/2] Update Doc/reference/compound_stmts.rst Co-authored-by: Carl Meyer --- Doc/reference/compound_stmts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index e84ff2aa70d634..0731589e4cadb8 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -363,7 +363,7 @@ one :keyword:`!except*` clause, the first that matches it. :: Any remaining exceptions that were not handled by any :keyword:`!except*` clause are re-raised at the end, along with all exceptions that were -raised from the within :keyword:`!except*` clauses. If this list contains +raised from within the :keyword:`!except*` clauses. If this list contains more than one exception to reraise, they are combined into an exception group.