what is lambda used for in real code?
hans at zephyrfalcon.org
Fri Dec 31 23:42:23 CET 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? :-)
More information about the Python-list