Skip to content

Commit d60210d

Browse files
committed
Mention exception chaining in contextmanager.__exit__
1 parent 5213f1b commit d60210d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5357,8 +5357,8 @@ before the statement body is executed and exited when the statement ends:
53575357
to suppress the exception and continue execution with the statement immediately
53585358
following the :keyword:`!with` statement. Otherwise the exception continues
53595359
propagating after this method has finished executing. Exceptions that occur
5360-
during execution of this method will replace any exception that occurred in the
5361-
body of the :keyword:`!with` statement.
5360+
during execution of this method will be propagated on top of any exception that
5361+
occurred in the body of the :keyword:`!with` statement.
53625362

53635363
The exception passed in should never be reraised explicitly - instead, this
53645364
method should return a false value to indicate that the method completed

0 commit comments

Comments
 (0)