Multiple equates

Jeremiah Dodds jeremiah.dodds at gmail.com
Wed Dec 3 06:45:05 EST 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?
> --
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081203/77bb7aa2/attachment-0001.html>


More information about the Python-list mailing list