A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-February/060464.html below:

[Python-Dev] Let's just *keep* lambda

[Python-Dev] Let's just *keep* lambda [Python-Dev] Let's just *keep* lambdaThomas Lotze thomas at thomas-lotze.de
Mon Feb 6 22:32:10 CET 2006
Steven Bethard wrote:

> Guido van Rossum wrote:
>> After so many attempts to come up with an alternative for lambda,
>> perhaps we should admit defeat. I've not had the time to follow the most
>> recent rounds, but I propose that we keep lambda, so as to stop wasting
>> everybody's talent and time on an impossible quest.

+1 for keeping the functionality, especially given list and generator
expressions being "compound lambda expressions" in a sense. Removing
anonymous functions would break a nice symmetry there.

> .. _alternatives: http://wiki.python.org/moin/AlternateLambdaSyntax

Of those, I like the "for" syntax without parens around the arguments
best: (x*y + z for x, y, z). Parentheses around the whole expression
should be optional in the same cases that allow for omitting parentheses
around generator expressions. It fits perfectly with the way generator
expression syntax relates to generator function definitions, and re-using
the "for" keyword keeps the zoo of reserved words small.

Just my 2 cents and all that...

-- 
Thomas


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4