S
Shi Mu
very hard for me to understand the difference between
try...except and try...finally
try...except and try...finally
very hard for me to understand the difference between try...except
and try...finally
Which is because in the finally block the exception is still "live"Shi Mu enlightened us with:
Within a 'try' block, if an exception is called and a matching
'except' block is found, that block will be used to handle the
expression.
From the documentation of the "return" keyword: "When return passes
control out of a try statement with a finally clause, that finally
clause is executed before really leaving the function." Note that
there is no talk about exceptions in this.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.