File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -340,15 +340,15 @@ exceptions (:exc:`BaseExceptionGroup` instances). A :keyword:`try` statement
340340can have either :keyword: `except ` or :keyword: `!except* ` clauses, but not both.
341341The exception type for matching is mandatory in the case of :keyword: `!except* `,
342342so ``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
344344group 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
346346ambiguous semantics.
347347
348348When an exception group is raised in the try block, each :keyword: `!except* `
349349clause splits (see :meth: `~BaseExceptionGroup.split `) it into the subgroups
350350of 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 `)
352352and assigned to the target of the :keyword: `!except* ` clause (if there is one).
353353Then, the body of the :keyword: `!except* ` clause executes. If the non-matching
354354subgroup is not empty, it is processed by the next :keyword: `!except* ` in the
You can’t perform that action at this time.
0 commit comments