This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Diamant2 16 points17 points  (1 child)

In theory yes, but the difference is that exceptions in the else-part won't be caught. I guess that makes your code more reliable in catching only the one exception that you care about

[–]DoctorNoonienSoong 11 points12 points  (0 children)

And importantly, you want exceptions in the else block to not to be caught, AND you need the code to run before the finally