Skip to content

Commit 9392c26

Browse files
authored
Fix typo in compound_stmts.rst
1 parent 53c3dd9 commit 9392c26

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Doc/reference/compound_stmts.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,8 @@ was translated to ::
294294

295295
This means the exception must be assigned to a different name to be able to
296296
refer to it after the :keyword:`!except` clause.
297-
Exceptions are cleared because with the
298-
traceback attached to them, they form a reference cycle with the stack frame,
299-
keeping all locals in that frame alive until the next garbage collection occurs.
297+
Exceptions are cleared because their attached tracebacks form a reference cycle with the stack
298+
frame, keeping all locals in that frame alive until the next garbage collection occurs.
300299

301300
.. index::
302301
pair: module; sys
@@ -341,7 +340,7 @@ can have either :keyword:`except` or :keyword:`!except*` clauses, but not both.
341340
The exception type for matching is mandatory in the case of :keyword:`!except*`,
342341
so ``except*:`` is a syntax error. The type is interpreted as in the case of
343342
:keyword:`!except`, but matching is performed on the exceptions contained in the
344-
group that is being handled. An :exc:`TypeError` is raised if a matching
343+
group that is being handled. A :exc:`TypeError` is raised if a matching
345344
type is a subclass of :exc:`!BaseExceptionGroup`, because that would have
346345
ambiguous semantics.
347346

0 commit comments

Comments
 (0)