`... except ... with ...` more closely mirrors the inline if-else syntax, which I think is the idea, and it doesn't use a colon.
On Thu, Aug 6, 2020, 6:29 PM Rob Cliffe <[email protected]> wrote: > > > On 06/08/2020 23:14, Steele Farnsworth wrote: > > I have wanted this sort of syntax before but assumed it wasn't > > feasible and never considered how I'd want it to look. One possibility > > that wasn't mentioned in Chris's earlier PEP is this: > > > > `value = func() except Exception with default` > Er, how is this different from > (value = func() except Exception: default) > which is the PEP 463 syntax? > > > > Though you'd almost certainly want to use a more specific exception. > True. > >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/5D2272FRI6OEH5KS7GFBPPBO7SVIVUD5/ Code of Conduct: http://python.org/psf/codeofconduct/
