Adam Skutt wrote:
On Sep 5, 10:34 pm, Terry Reedy <tjre...@udel.edu> wrote:
Adam Skutt wrote:
On Sep 5, 11:29 am, Terry Reedy <tjre...@udel.edu> wrote:
This is a pointless replacement for 'def b(x): return x+a'
And?  That has nothing to do with anything I was saying whatsoever.
Agreed.  However, posts are read by newbies.
Posts that promote bad habits are fair game for comment.
There's nothing inappropriate about using a lambda for a function I
don't care to give a name.  That's the entire reason they exist.

But you did give a name -- 'b' -- and that is when a lambda expression is inappropriate and when a def statement should be used instead

The idea that Python has 'lambda objects' had caused no end of mischief
over the years.
As near as I can tell, this is because you're insisting on creating a
semantic distinction where there just isn't one.

To the contrary, I am objecting to the spurious distinction 'lambda object' as people often use it.

tjr

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to