I notice you said "args" not "arg". How would you parse foo(x, y -> x + y)? Even if the compiler can parse it, how about the human reading the code?
If lambda wasn't already there, I could see using (args) -> expr syntax but I think there shouldn't be two ways to do something so simple.
If you really want a shorter syntax, the obvious choice is foo(ëx, y: x + y).
--- Bruce
My suggestion for a lightweight lambda syntax is
args -> expr
Examples:
map(x -> x + 5, something)
d = defauldict(->[])
--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas