Skip to content

Commit 1bdba4d

Browse files
pR0Psiritkatriel
andauthored
Reference GH issue in comment
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
1 parent a6f948b commit 1bdba4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/contextlib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ def __exit__(self, typ, value, traceback):
166166
value = typ()
167167
try:
168168
# If the generator handles the exception thrown into it, the
169-
# exception context will revert to the actual current exception
169+
# exception context reverts to the actual current exception
170170
# context here. In order to make the context manager behave
171171
# like a normal function we set the current exception context
172172
# to what it was during the context manager's __enter__
173+
# (see gh-111676).
173174
sys._set_exception(exc_context)
174175
self.gen.throw(value)
175176
except StopIteration as exc:

0 commit comments

Comments
 (0)