On Wed, Dec 3, 2008 at 6:23 AM, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> > So why is that better? > -- > http://mail.python.org/mailman/listinfo/python-list > I personally think that it looks marginally cleaner (indentation issues aside). Do you think it's substantially worse? If so, why? I mean you asked how you would express the original code with the lambda - that's how you would, by pulling the lambda out into a function. How would you express it better is a different question. I think that the code in question is an example of a case where a lambda is appropriate in python, but it's definitely not any worse for having the code pulled out. If the function wasn't trival, you'd have to anyhow. The whole "lambdas good or bad" thing has been done to death as far as it relates to python. For python, it seems that anonymous functions are a no-no unless they're effectively one liners.
-- http://mail.python.org/mailman/listinfo/python-list