wim*_*wim 20 python exception finally try-catch
为什么foowhiz 中的异常被忽视,但bar引发了异常?
def foo():
try:
raise Exception('foo')
finally:
return
def bar():
try:
raise Exception('bar')
finally:
pass
foo()
bar()
Run Code Online (Sandbox Code Playgroud)