Why does the exception in foo
whizz by unnoticed, but the exception in bar
is raised?
def foo():
try:
raise Exception('foo')
finally:
return
def bar():
try:
raise Exception('bar')
finally:
pass
foo()
bar()
From the Python documentation: