On 23/02/2021 17:46, Stéfane Fermigier wrote:
On Tue, Feb 23, 2021 at 6:13 PM Richard Damon
<rich...@damon-family.org <mailto:rich...@damon-family.org>> wrote:
Also note, that I am not saying that 'arrow-functions' can't happen,
just that if they are created, a natural consequence is that, like
with
.format(), the 'old' (lambda) way will need to be marked as 'old', and
not the current obvious way.
If there is a consensus that arrows are better enough that lambdas,
and arrows happen, lambdas will be considered 'old' and automated
converters such as pyupgrade will be quick to replace lambdas (and
people publishing libraries will have to wait until the EOL of the
older versions of Python before being able to run it).
And if, otherwise, there is no such consensus, the change will never
happen.
Same as u"xxx" versus Unicode("xxx"), x**y vs pow(x, y), x @ y
vs. matmul(x, y), etc.
S.
As far as I know, there is no case of valid syntax using 'lambda' where
replacing 'lambda' by 'def' results in valid syntax.
Can anyone provide a counter-example?
If not, I would support allowing 'def' as an alternative to 'lambda'
(allowing 'def' to ultimately become the recommended usage).
(I'm -0.5 on adding an alternative arrow syntax, but that's a purely
subjective opinion.)
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/JP7Y46V2SKIHVHJC5BIHQZ4SUFDMQIY6/
Code of Conduct: http://python.org/psf/codeofconduct/