Commit 0c80eabb authored by Stefan Behnel's avatar Stefan Behnel

improved test case

parent 06b31a13
__doc__ = u"""
>>> print(foo())
a
"""
# Indirectly makes sure the cleanup happens correctly on breaking. # Indirectly makes sure the cleanup happens correctly on breaking.
def foo():
for x in "abc": def try_except_break():
"""
>>> print(try_except_break())
a
"""
for x in list("abc"):
try: try:
x() x()
except: except:
break break
for x in "abc": return x
def try_break_except():
"""
>>> print(try_break_except())
a
"""
for x in list("abc"):
try:
break
except:
pass
return x
def try_no_break_except_return():
"""
>>> print(try_no_break_except_return())
a
"""
for x in list("abc"):
try: try:
x() x()
break
except: except:
return x return x
return x
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment