elseno-error finallycleanup againthe finally block is always run on the way outregardless of what happened in the main action and regardless of any exception handlers run in the nested try (trace through the four cases listed previously to see how this works the samesince an else always requires an exceptthis nested form even sports the same mixing constraints of the unified statement form outlined in the preceding section howeverthis nested equivalent seems more obscure to someand requires more code than the new merged form--though just one four-character line plus extra indentation mixing finally into the same statement makes your code arguably easier to write and readand is generally preferred technique today unified try example here' demonstration of the merged try statement form at work the following filemergedexc pycodes four common scenarioswith print statements that describe the meaning of eachfile mergedexc py (python xsep '- '\nprint(sep 'exception raised and caught'tryx 'spam'[ except indexerrorprint('except run'finallyprint('finally run'print('after run'print(sep 'no exception raised'tryx 'spam'[ except indexerrorprint('except run'finallyprint('finally run'print('after run'print(sep 'no exception raisedwith else'tryx 'spam'[ except indexerrorprint('except run'elseunified try/except/finally