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:
|
||||
VAR1 = ext(*exc) # May re-raise *exc
|
||||
else:
|
||||
raise *exc # Well, the moral equivalent :-)
|
||||
raise exc[0], exc[1], exc[2]
|
||||
else:
|
||||
VAR1 = next(itr, arg) # May raise StopIteration
|
||||
except StopIteration:
|
||||
|
@ -250,13 +250,13 @@ Specification: the Anonymous Block Statement
|
|||
|
||||
- "break" is always legal; it is translated into:
|
||||
|
||||
exc = (StopIteration,)
|
||||
exc = (StopIteration, None, None)
|
||||
continue
|
||||
|
||||
- "return EXPR3" is only legal when the block-statement is
|
||||
contained in a function definition; it is translated into:
|
||||
|
||||
exc = (StopIteration,)
|
||||
exc = (StopIteration, None, None)
|
||||
ret = True
|
||||
val = EXPR3
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue