On Wed, 17 Feb 2021 at 15:31, Ethan Furman <et...@stoneleaf.us> wrote:

> On 2/17/21 8:47 AM, Random832 wrote:
> > On Tue, Feb 16, 2021, at 23:24, Stephen J. Turnbull wrote:
>
> >> except a couple of characters.  So what currently looks like
> >>
> >>      some_list.sort(key=lambda e: e[3].priority)
> >>
> >> would then be
> >>
> >>      some_list.sort(key=(e)->e[3].priority)
> >
> > Let's not pretend the key argument being keyword-only isn't a wart.
> Surely this would be better if it could be some_list.sort(e->e[3].priority).
>
> No need to pretend, it isn't a wart.
>
> -1 on removing the lambda keyword.  Just because excessive punctuation
> works for other languages does not mean it's a good fit for Python.
>
> Indeed - I think typing `import this` is enough to see that this change
would directly contradict 6 of the first 7 guidelines in the zen.

If someone comes with a "pythonic" way to lift restrictions on
lambda, that could be something for debate, but so far this is
just about uglifying it, and creating a new syntax matching
exactly what exists today.

Moreover I'd like to remind people so much worried about
expressiveness in less and less characters that Lambda is
much less needed in Python than in similar languages due
to the existence of the comprehensions and generator expression
constructs.

The energy spent here could be focused instead on having an
equivalent of comprehensions for "reduce", for example.

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

Reply via email to