Skip to content

Commit f686a29

Browse files
iritkatrielpicnixz
andauthored
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent f396307 commit f686a29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/reference/compound_stmts.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@ exceptions (:exc:`BaseExceptionGroup` instances). A :keyword:`try` statement
340340
can have either :keyword:`except` or :keyword:`!except*` clauses, but not both.
341341
The exception type for matching is mandatory in the case of :keyword:`!except*`,
342342
so ``except*:`` is a syntax error. The type is interpreted as in the case of
343-
:keyword:`except`, but matching is performed on the exceptions contained in the
343+
:keyword:`!except`, but matching is performed on the exceptions contained in the
344344
group that is being handled. An :exc:`TypeError` is raised if a matching
345-
type is a subclass of :exc:`BaseExceptionGroup`, because that would have
345+
type is a subclass of :exc:`!BaseExceptionGroup`, because that would have
346346
ambiguous semantics.
347347

348348
When an exception group is raised in the try block, each :keyword:`!except*`
349349
clause splits (see :meth:`~BaseExceptionGroup.split`) it into the subgroups
350350
of matching and non-matching exceptions. If the matching subgroup is not empty,
351-
it becomes the handled exception (the value returned from ``sys.exception()``)
351+
it becomes the handled exception (the value returned from :func:`sys.exception`)
352352
and assigned to the target of the :keyword:`!except*` clause (if there is one).
353353
Then, the body of the :keyword:`!except*` clause executes. If the non-matching
354354
subgroup is not empty, it is processed by the next :keyword:`!except*` in the

0 commit comments

Comments
 (0)