I have used try-catch/except-finally variants in many languages for years, today someone asked me what is the point of finally and I couldn\'t answer.
Basically why wo
The purpose of a finally block is to ensure that code gets run in three circumstances which would not very cleanly be handled using "catch" blocks alone:
try block exits via return
catch block either rethrows the caught exception, or--accidentally or intentionally--ends up throwing a new one.
try block encounters an exception which for which the try has no catch.
One could copy the finally code before every return or throw, and wrap catch blocks within their own try/catch to allow for the possibility of an accidental exception occurring, but it's far easier to forgo all that and simply use a finally block.
BTW, one thing I wish language designers would include would be an exception argument to the finally block, to deal with the case where one needs to clean up after an exception but still wants it to percolate up the call stack (e.g. one could wrap the code for a constructor in such a construct, and Dispose the object under construction if the constructor was going to exit with an exception).