There's no need to be fuzzy about the moreal equivalent of "raise
*exc".
This commit is contained in:
parent
87d2fd6de8
commit
57968c2010
|
@ -224,7 +224,7 @@ Specification: the Anonymous Block Statement
|
||||||
if ext is not None:
|
if ext is not None:
|
||||||
VAR1 = ext(*exc) # May re-raise *exc
|
VAR1 = ext(*exc) # May re-raise *exc
|
||||||
else:
|
else:
|
||||||
raise *exc # Well, the moral equivalent :-)
|
raise exc[0], exc[1], exc[2]
|
||||||
else:
|
else:
|
||||||
VAR1 = next(itr, arg) # May raise StopIteration
|
VAR1 = next(itr, arg) # May raise StopIteration
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
|
@ -250,13 +250,13 @@ Specification: the Anonymous Block Statement
|
||||||
|
|
||||||
- "break" is always legal; it is translated into:
|
- "break" is always legal; it is translated into:
|
||||||
|
|
||||||
exc = (StopIteration,)
|
exc = (StopIteration, None, None)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
- "return EXPR3" is only legal when the block-statement is
|
- "return EXPR3" is only legal when the block-statement is
|
||||||
contained in a function definition; it is translated into:
|
contained in a function definition; it is translated into:
|
||||||
|
|
||||||
exc = (StopIteration,)
|
exc = (StopIteration, None, None)
|
||||||
ret = True
|
ret = True
|
||||||
val = EXPR3
|
val = EXPR3
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue