
Aug. 1, 2023
11:13 p.m.
On Wed, 2 Aug 2023 at 08:22, Mitch <mitchell.negus.57@gmail.com> wrote:
If `except` is omitted, then catch the generic exception and do nothing and exit.
Not sure what you mean here. If you have a try-finally with no except clause, no exceptions will be caught; the try will be run, then the finally, and then you'll see any exception from the try block. Perhaps what you're intending is for an omitted except clause to behave like "except: raise"? Because that would probably have most of the effect of the proposed "try-else", without a dangling else. And I'd still like to see an actual real-world (or "near-real-world") example that would benefit from this. Would adding "except: raise" be a problem? ChrisA