lambda (and reduce) are valuable

David Isaac aisaac0 at verizon.net
Mon Dec 12 01:02:47 EST 2005


"Chris Mellon" <arkanes at gmail.com> wrote in message
news:mailman.1945.1134220003.18701.python-list at python.org...

> As someone who does a tremendous amount of event-driven GUI
> programming, I'd like to take a moment to speak out against people
> using us as a testament to the virtues of lamda. Event handlers are
> the most important part of event-driven code, and  making them real
> functions with real names is crucial to maintainable code. The only
> reason to ever use a lamdba in Python is because you don't want to
> give a function a name, and that is just not a compelling use case for
> GUI events.

Obviously opinions differ. See the discussion at
http://www.artima.com/forums/flat.jsp?forum=106&thread=98196&start=30&msRange=15
I find many of the pleas for lambda persuasive as well.
For the contribution of lambda to maintainability,
see e.g. Gary Robinson's comment at that link.

Alan Isaac





More information about the Python-list mailing list