what is lambda used for in real code?
Hans Nowak
hans at zephyrfalcon.org
Fri Dec 31 17:42:23 EST 2004
Adam DePrince wrote:
> In sort, we must preserve the ability to create an anonymous function
> simply because we can do so for every other object type, and functions
> are not special enough to permit this special case.
Your reasoning makes sense... lambda enables you to create a function as
part of an expression, just like other types can be part of an
expression. However, by that same reasoning, maybe classes aren't
special enough either to warrant a special case. Where's the keyword to
create an anonymous class? :-)
--
Hans Nowak
http://zephyrfalcon.org/
More information about the Python-list
mailing list