On Tue, 18 Jul 2023 at 08:38, Dom Grigonis <dom.grigo...@gmail.com> wrote:
>
> > Was that really the intention? Because I was there when PEP 572 was
> > written, and I don't recall "beautiful one-liners" as one of the
> > justifying reasons. Use around if/while conditions was a strong
> > reason, and yes, that can save a line, but "beautiful one-liners"
> > hasn't generally been a justifying factor in any Python feature.
>
> Never said about the intention, just stated that I see it as being a part of 
> their construction.
>
> However, in the PEP you have referred and also as I remember reading python’s 
> “what’s new”, list comprehensions and other 1-liners were close to half of 
> all examples.
>

That is very true. Compactness makes for great "what's new" entries.
They want to be easily skimmable, which means they need to be short.
That's a constraint that isn't true of real-world code, and it WILL
cause the what's-new entries to be a bit nonrepresentative.

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

Reply via email to