Skip to content

Commit 9b12084

Browse files
gh-98172: Fix formatting in except* docs (GH-98173)
(cherry picked from commit 5ecf961) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 9d44ca5 commit 9b12084

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

Doc/reference/compound_stmts.rst

+11-12
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,17 @@ one :keyword:`!except*` clause, the first that matches it. ::
363363
+-+---------------- 1 ----------------
364364
| ValueError: 1
365365
+------------------------------------
366-
>>>
367-
368-
Any remaining exceptions that were not handled by any :keyword:`!except*`
369-
clause are re-raised at the end, combined into an exception group along with
370-
all exceptions that were raised from within :keyword:`!except*` clauses.
371-
372-
An :keyword:`!except*` clause must have a matching type,
373-
and this type cannot be a subclass of :exc:`BaseExceptionGroup`.
374-
It is not possible to mix :keyword:`except` and :keyword:`!except*`
375-
in the same :keyword:`try`.
376-
:keyword:`break`, :keyword:`continue` and :keyword:`return`
377-
cannot appear in an :keyword:`!except*` clause.
366+
367+
Any remaining exceptions that were not handled by any :keyword:`!except*`
368+
clause are re-raised at the end, combined into an exception group along with
369+
all exceptions that were raised from within :keyword:`!except*` clauses.
370+
371+
An :keyword:`!except*` clause must have a matching type,
372+
and this type cannot be a subclass of :exc:`BaseExceptionGroup`.
373+
It is not possible to mix :keyword:`except` and :keyword:`!except*`
374+
in the same :keyword:`try`.
375+
:keyword:`break`, :keyword:`continue` and :keyword:`return`
376+
cannot appear in an :keyword:`!except*` clause.
378377

379378

380379
.. index::

0 commit comments

Comments
 (0)