diff --git a/pep-0343.txt b/pep-0343.txt index fb8d998a8..2d64ef855 100644 --- a/pep-0343.txt +++ b/pep-0343.txt @@ -228,17 +228,19 @@ Specification: The 'with' Statement ctx = (EXPR).__context__() exit = exc.__exit__ # Not calling it yet value = ctx.__enter__() - exc = (None, None, None) + exc = True try: try: VAR = value # Only if "as VAR" is present BLOCK except: - exc = None + # The exceptional case is handled here + exc = False exit(*sys.exc_info()) finally: + # The normal and non-local-goto cases are handled here if exc: - exit(*exc) + exit(None, None, None) Here, the lowercase variables (ctx, exit, value, exc) are internal variables and not accessible to the user; they will most likely be