7 Aug
2020
7 Aug
'20
4:06 a.m.
`... 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
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.