Jan-12-2021, 05:56 PM
You label the code "innocuous", but it's hard to guarantee that. In the first case if the innocuous code does raise an exception, it might (incorrectly) be caught by the exception handlers. Putting it in else guarantees that any exceptions it does raise are not caught locally.