On 16/02/21 6:29 am, Guido van Rossum wrote:
I can sympathize with trying to get a replacement for lambda, because many other languages have jumped on the arrow bandwagon, and few Python first-time programmers have enough of a CS background to recognize the significance of the word lambda.
I think there's also just a desire for brevity. In the situations where it's appropriate to use a lambda, you want something very compact, and "lambda" is a rather long and unwieldy thing to have stuck in there. Another thing that comes to mind is that the way Python uses "lambda" is somewhat arbitrary. In Lisp, the first programming language where it was used, it's the *fundamental* way of creating a function. All the other function-defining constructs are macros that expand into something containing a lambda. But Python uses it *only* for in-line anonymous functions, so it feels sort of tacked on. I'm not arguing for or against anything here, just exploring possible reasons why the idea of lambda-replacement comes up so often. -- Greg _______________________________________________ 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/SZAJ44BPCJQRCNO7BKRW4S3FDNXMGHLF/ Code of Conduct: http://python.org/psf/codeofconduct/