Skip to content

Commit e0260d0

Browse files
miss-islingtonJelleZijlstra
authored andcommitted
gh-98172: Fix formatting in except* docs (GH-98173)
(cherry picked from commit 5ecf961) Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent 7b1be2a commit e0260d0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Doc/reference/compound_stmts.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,17 @@ one except* clause, the first that matches it. ::
340340
+-+---------------- 1 ----------------
341341
| ValueError: 1
342342
+------------------------------------
343-
>>>
344343

345-
Any remaining exceptions that were not handled by any except* clause
346-
are re-raised at the end, combined into an exception group along with
347-
all exceptions that were raised from within except* clauses.
344+
Any remaining exceptions that were not handled by any :keyword:`!except*`
345+
clause are re-raised at the end, combined into an exception group along with
346+
all exceptions that were raised from within :keyword:`!except*` clauses.
348347

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

355355

356356
.. index::

0 commit comments

Comments
 (0)