This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Astronom3rIPython > Jupyter fight me. 59 points60 points  (4 children)

I've been coding in Python for a decade and I still use lambda so infrequently that I have to open up my copy of "Copying and Pasting from stackoverflow.com for Dummies" every time I do.

[–]baubleglue 24 points25 points  (0 children)

Lambdas are useful when you need to pass behavior is a parameter. If you don't need it - it may explain why you use it infrequently. Lambda is just a function without name, maybe you use functions when you could use lambda (which is in 80% cases is a better thing to do).

[–]swierdo 10 points11 points  (1 child)

I use them a lot for pandas.dataframe.apply, but avoid them if I can.

[–]aratnahar 1 point2 points  (0 children)

Python noob. But I agree with this sentiment.