Skip to content

Commit

Permalink
pythongh-98172: Fix formatting in except* docs (pythonGH-98173)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5ecf961)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
JelleZijlstra authored and miss-islington committed Oct 11, 2022
1 parent 9d44ca5 commit 7b71792
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions Doc/reference/compound_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -363,18 +363,17 @@ one :keyword:`!except*` clause, the first that matches it. ::
+-+---------------- 1 ----------------
| ValueError: 1
+------------------------------------
>>>

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.

An :keyword:`!except*` clause must have a matching type,
and this type cannot be a subclass of :exc:`BaseExceptionGroup`.
It is not possible to mix :keyword:`except` and :keyword:`!except*`
in the same :keyword:`try`.
:keyword:`break`, :keyword:`continue` and :keyword:`return`
cannot appear in an :keyword:`!except*` clause.

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.

An :keyword:`!except*` clause must have a matching type,
and this type cannot be a subclass of :exc:`BaseExceptionGroup`.
It is not possible to mix :keyword:`except` and :keyword:`!except*`
in the same :keyword:`try`.
:keyword:`break`, :keyword:`continue` and :keyword:`return`
cannot appear in an :keyword:`!except*` clause.


.. index::
Expand Down

0 comments on commit 7b71792

Please sign in to comment.