On 31 Jul 2009, at 10:25 , Chris Rebert wrote:
On Fri, Jul 31, 2009 at 1:21 AM, Xavier Ho<cont...@xavierho.com>
wrote:
On Fri, Jul 31, 2009 at 6:08 PM, Masklinn <maskl...@masklinn.net>
wrote:
<snip>... but since Python doesn't have anonymous functions that
usage
tends to be a bit too verbose ... <snip>
Sorry to interrupt, but wouldn't lambda in Python be considered as
'anonymous functions'?
I believe "full" anonymous functions was intended by the author.
lambdas are limited to a single expression.
Yes, and they're limited to a single *expression*, so before Python 3,
lambda: print "foo" is out. Likewise, it isn't possible to have an if/
else statement within a lambda (though a ternary is ok), or a with, …
since Python statements aren't expressions.
--
http://mail.python.org/mailman/listinfo/python-list