On 07/08/2020 06:52, Chris Angelico wrote:
On Fri, Aug 7, 2020 at 11:01 AM Jonathan Grant
<jonathanallengr...@gmail.com> wrote:
How can we start to revive this PEP?
[I.e. PEP 463 Exception-catching expressions]
Have a read of the PEP's rejection notice at the top. To revive the
PEP, the objections to it need to be solved.

ChrisA
_______________________________________________

TLDR: The "objections" to the PEP can't be "solved" if there aren't any.

Here is the full rejection notice in *bold* and some comments from me:

*I want to reject this PEP. I think the proposed syntax is acceptable given the desired semantics, although it's still a bit jarring. It's probably no worse than the colon used with lambda (which echoes the colon used in a def just like the colon here echoes the one in a try/except) and definitely better than the alternatives listed.*

The only objection here is that the syntax is "a bit jarring", apparently referring to a colon appearing in the middle of a line.  But the syntax was subject to the usual bikeshedding at the time, and the proposed one is "definitely better than the alternatives listed".  It seems unlikely that anyone could find a better syntax now (although if they can, great!), so why object to it?

*But the thing I can't get behind are the motivation and rationale. I don't think that e.g. dict.get() would be unnecessary once we have except expressions, and I disagree with the position that EAFP is better than LBYL, or "generally recommended" by Python. (Where do you get that?
From the same sources that are so obsessed with DRY they'd rather
introduce a higher-order-function than repeat one line of code? :-)*

OK, some of the arguments are a bit exaggerated.  (This can be corrected.)  But _this is not an objection to the PEP per se_, just to the way some of the arguments are worded.  ISTM that the motivation and rationale are explained well in the PEP, and the rejection notice does not address them at all.  (I might particularly mention the section "Narrowing of exception-catching scope" which illustrates how some existing code can easily be _improved_ with exception-catching expressions.)

So: thus far in my IMO there has been _no substantive objection to the PEP_ whatseover.

*This is probably the most you can get out of me as far as a pronouncement. Given that the language summit is coming up I'd be happy to dive deeper in my reasons for rejecting it there (if there's demand).*

Yes please Guido, would you be willing to expand on this?  It's hard to counter objections without knowing what they are.  I apologise for the intrusion, but this is the reason I am copying this post to you.

*I do think that (apart from never explaining those dreadful acronyms :-)*

This too can be corrected.

t*his was a well-written and well-researched PEP, and I think you've done a great job moderating the discussion, collecting objections, reviewing alternatives, and everything else that is required to turn a heated debate into a PEP. Well done Chris (and everyone who helped), and good luck with your next PEP!*

Quite so.

Best wishes

Rob Cliffe

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

Reply via email to