Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb288da

Browse files
committed
rephrase and remove uneeded statement
1 parent 3778db7 commit fb288da

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Doc/reference/compound_stmts.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,12 @@ was translated to ::
272272
try:
273273
foo
274274
finally:
275-
N = None
276275
del N
277276

278-
That means that you have to assign the exception to a different name if you want
279-
to be able to refer to it after the except clause. The reason for this is that
280-
with the traceback attached to them, exceptions will form a reference cycle with
281-
the stack frame, keeping all locals in that frame alive until the next garbage
282-
collection occurs.
277+
This means the exception must be assigned to a different name to be able to
278+
refer to it after the except clause. Exceptions are cleared because with the
279+
traceback attached to them, they form a reference cycle with the stack frame,
280+
keeping all locals in that frame alive until the next garbage collection occurs.
283281

284282
.. index::
285283
module: sys

0 commit comments

Comments
 (0)