>> As I see it, a lambda is an anonymous function. An anonymous function
    >> is a function without a name. We already have a syntax for a
    >> function...  why not use it. ie:
    >> 
    >> f = filter(def (a): return a > 1, [1,2,3])

    Kay> You mix expressions with statements. 

You could remove the "return" and restrict the body of the def to an
expression: 

    f = filter(def (a): a > 1, [1,2,3])

That looks almost exactly like a lambda, but uses "def" and parenthesizes
the argument list. It seems to me that would remind people "this is a
function".

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to