File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -5239,9 +5239,11 @@ before the statement body is executed and exited when the statement ends:
52395239 Returning a true value from this method will cause the :keyword: `with ` statement
52405240 to suppress the exception and continue execution with the statement immediately
52415241 following the :keyword: `!with ` statement. Otherwise the exception continues
5242- propagating after this method has finished executing. Exceptions that occur
5243- during execution of this method will replace any exception that occurred in the
5244- body of the :keyword: `!with ` statement.
5242+ propagating after this method has finished executing.
5243+
5244+ If this method raises an exception while handling an earlier exception from the
5245+ :keyword: `with ` block, the new exception is raised, and the original exception
5246+ is stored in its :attr: `~BaseException.__context__ ` attribute.
52455247
52465248 The exception passed in should never be reraised explicitly - instead, this
52475249 method should return a false value to indicate that the method completed
You can’t perform that action at this time.
0 commit comments