On Wed, 2 Aug 2023 at 08:22, Mitch <mitchell.negus...@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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/OK5LMB7PAF2RRHQE7FHE2E7X6CYIFUDD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to