[Python-checkins] r42682 - peps/trunk/pep-0343.txt
guido.van.rossum
python-checkins at python.org
Tue Feb 28 22:05:40 CET 2006
Author: guido.van.rossum
Date: Tue Feb 28 22:05:40 2006
New Revision: 42682
Modified:
peps/trunk/pep-0343.txt
Log:
Clarify the expanded code -- exc is just used as a flag.
Modified: peps/trunk/pep-0343.txt
==============================================================================
--- peps/trunk/pep-0343.txt (original)
+++ peps/trunk/pep-0343.txt Tue Feb 28 22:05:40 2006
@@ -228,17 +228,19 @@
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
More information about the Python-checkins
mailing list