Skip to content

Commit 9388020

Browse files
committed
Fix typos; enhance comments on patch for SF #1462485.
--This line, and those below, will be ignored-- M contextlib.py
1 parent cdab455 commit 9388020

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/contextlib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ def __exit__(self, type, value, traceback):
3232
self.gen.throw(type, value, traceback)
3333
raise RuntimeError("generator didn't stop after throw()")
3434
except StopIteration:
35-
# Supress the exception unless it's the same exception the
36-
# was passed to throw().
35+
# Suppress the exception *unless* it's the same exception that
36+
# was passed to throw(). This prevents a StopIteration
37+
# raised inside the "with" statement from being suppressed
3738
return sys.exc_info()[1] is not value
3839
except:
3940
# only re-raise if it's *not* the exception that was

0 commit comments

Comments
 (0)