News for hackers. Stuff that matters.
Re:What Pythonistas Think of Ruby by grandalf on Wednesday February 03, 2010 @02:42PM (#1098625)
You are correct. There is no reason not to just use an inline function that happens to have a name. I think the "lambdas can only be one line" is a newbie python mistake.
Re:What Pythonistas Think of Ruby by steveklabnik on Wednesday February 03, 2010 @04:33PM (#1098937)
Personally, I dislike naming things that I won't use again. It feels like a waste. And then, since I have to name things, I have to come up with a _good_ name.

Just a matter of taste, mind you, but it's my reasoning for preferring anonymous functions.

Re:What Pythonistas Think of Ruby by grandalf on Wednesday February 03, 2010 @05:01PM (#1099009)
They do make code more readable sometimes... but I think they are often used in Ruby as an alternative to @obj.method(:foo) -- in other words the Rubyist would use lambda{@obj.foo} and the pythonista would use obj.foo