Um, I thought I'd already checked this in.

Anyway, this is the changes to the with-statement
so that __exit__ must return a true value in order
for a pending exception to be ignored.
The PEP (343) is already updated.
This commit is contained in:
Guido van Rossum 2006-03-10 02:28:35 +00:00
parent 692cdbc5d6
commit f669436189
11 changed files with 61 additions and 106 deletions

View file

@ -2196,8 +2196,6 @@ class ContextManager(object):
return self.new_context
def __exit__(self, t, v, tb):
setcontext(self.saved_context)
if t is not None:
raise t, v, tb
class Context(object):
"""Contains the context for a Decimal instance.