In the original translation for block-statement, reset ret = False

each time before executing BLOCK1.  (Thanks to Duncan Booth.)
This commit is contained in:
Guido van Rossum 2005-04-27 21:54:27 +00:00
parent a5e037cd4c
commit e18916a7b6
1 changed files with 8 additions and 6 deletions

View File

@ -168,6 +168,7 @@ Specification: the Anonymous Block Statement
break
try:
val = arg = None
ret = False
BLOCK1
except Exception, val:
arg = StopIteration()
@ -344,12 +345,13 @@ Examples
Acknowledgements
In no useful order: Alex Martelli, Barry Warsaw, Bob Ippolito,
Brett Cannon, Brian Sabbey, Doug Landauer, Fredrik Lundh, Greg
Ewing, Holger Krekel, Jason Diamond, Jim Jewett, Josiah Carlson,
Ka-Ping Yee, Michael Chermside, Michael Hudson, Nick Coghlan, Paul
Moore, Phillip Eby, Raymond Hettinger, Samuele Pedroni, Shannon
Behrens, Steven Bethard, Terry Reedy, Tim Delaney, Aahz, and
others. Thanks all for a valuable discussion and ideas.
Brett Cannon, Brian Sabbey, Doug Landauer, Duncan Booth, Fredrik
Lundh, Greg Ewing, Holger Krekel, Jason Diamond, Jim Jewett,
Josiah Carlson, Ka-Ping Yee, Michael Chermside, Michael Hudson,
Nick Coghlan, Paul Moore, Phillip Eby, Raymond Hettinger, Samuele
Pedroni, Shannon Behrens, Steven Bethard, Terry Reedy, Tim
Delaney, Aahz, and others. Thanks all for a valuable discussion
and ideas.
References