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