From: Phillip J. Eby Date: Mon, 3 Apr 2006 21:20:07 +0000 (+0000) Subject: Fix typos; enhance comments on patch for SF #1462485. X-Git-Tag: v2.5a1~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9388020b86cbc21901f6cf4612866aaa9c85efbe;p=python Fix typos; enhance comments on patch for SF #1462485. --This line, and those below, will be ignored-- M contextlib.py --- diff --git a/Lib/contextlib.py b/Lib/contextlib.py index c26e27e924..418a3b7820 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