Add additional testcase for finally/return.
This commit is contained in:
parent
e09ffa1400
commit
3c95ba7e4e
|
@ -5,3 +5,19 @@ def func1():
|
|||
print("finally 1")
|
||||
|
||||
print(func1())
|
||||
|
||||
|
||||
def func2():
|
||||
try:
|
||||
return "it worked"
|
||||
finally:
|
||||
print("finally 2")
|
||||
|
||||
def func3():
|
||||
try:
|
||||
s = func2()
|
||||
return s + ", did this work?"
|
||||
finally:
|
||||
print("finally 3")
|
||||
|
||||
print(func3())
|
||||
|
|
Loading…
Reference in New Issue