On 06/08/2020 23:36, Steele Farnsworth wrote:
`... except ... with ...` more closely mirrors the inline if-else syntax, which I think is the idea, and it doesn't use a colon.
Sorry, I don't understand.  Presuambly you're referring to
    x = expr1 if cond else expr2
I don't see how adding 'with' adds any resemblance for this.

I take the point about the colon.  But: there was the usual shedload of bikeshedding over the syntax when PEP 463 was discussed, and while it will be up to Chris if he revives the PEP, it doesn't seem to me to be particularly helpful to go though it again.
Best wishes
Rob


On Thu, Aug 6, 2020, 6:29 PM Rob Cliffe <rob.cli...@btinternet.com <mailto:rob.cli...@btinternet.com>> 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 -- 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/5D2272FRI6OEH5KS7GFBPPBO7SVIVUD5/
Code of Conduct: http://python.org/psf/codeofconduct/

_______________________________________________
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/GGJ4X4SAIRTVFD4I33BO7VXWGOGOTZFD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to