jeremiah.dodds at gmail.com
Wed Dec 3 12:45:05 CET 2008
On Wed, Dec 3, 2008 at 6:23 AM, Lawrence D'Oliveiro
<ldo at geek-central.gen.new_zealand> wrote:
> So why is that better?
I personally think that it looks marginally cleaner (indentation issues
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list