diff options
author | Phillip J. Eby <pje@telecommunity.com> | 2006-04-03 21:20:07 (GMT) |
---|---|---|
committer | Phillip J. Eby <pje@telecommunity.com> | 2006-04-03 21:20:07 (GMT) |
commit | 9388020b86cbc21901f6cf4612866aaa9c85efbe (patch) | |
tree | 1b57ca7b3f3b7e3807f33605cd470b861ee6a1c1 | |
parent | cdab455f9a39f68b4a0cb25584f239368d742a19 (diff) | |
download | cpython-9388020b86cbc21901f6cf4612866aaa9c85efbe.zip cpython-9388020b86cbc21901f6cf4612866aaa9c85efbe.tar.gz cpython-9388020b86cbc21901f6cf4612866aaa9c85efbe.tar.bz2 |
Fix typos; enhance comments on patch for SF #1462485.
--This line, and those below, will be ignored--
M contextlib.py
-rw-r--r-- | Lib/contextlib.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py index c26e27e..418a3b7 100644 --- a/Lib/contextlib.py +++ b/Lib/contextlib.py @@ -32,8 +32,9 @@ class GeneratorContextManager(object): self.gen.throw(type, value, traceback) raise RuntimeError("generator didn't stop after throw()") except StopIteration: - # Supress the exception unless it's the same exception the - # was passed to throw(). + # Suppress the exception *unless* it's the same exception that + # was passed to throw(). This prevents a StopIteration + # raised inside the "with" statement from being suppressed return sys.exc_info()[1] is not value except: # only re-raise if it's *not* the exception that was |