On Wed, Feb 17, 2010 at 4:41 AM, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote: > > Gary's friend Geoffrey Grosenbach says in his blog post (which Gary > linked to): "Python has no comparable equivalent to Ruby’s do end > block. Python lambdas are limited to one line and can’t contain > statements (for, if, def, etc.). Which leaves me wondering, what’s the > point?" > > I'm sorry, lambda's do support if's and for's. Also, lambda's are > expressions, not statements, but you can pass them around, keep them > in a dictionary if you want to. And if you need more than one line of > statements, for crying out loud use a def?
I think that's a bit of a strawman: the point made by the OP is that it enables writing simple DSL easier, and the ruby's community seems to value this. They are not advocating using anonymous functions where "normal" functions would do. cheers, David -- http://mail.python.org/mailman/listinfo/python-list