For any possible try-finally block in Python, is it guaranteed that the finally block will always be executed?
finally
For example, let’s say I return while in an <
Addendum to the accepted answer, just to help to see how it works, with a few examples:
This:
try: 1 except: print 'except' finally: print 'finally'
will output
try: 1/0 except: print 'except' finally: print 'finally'
except finally