r/programming • u/yangzhou1993 • Nov 19 '22
5 Uses of Lambda Functions in Python
https://medium.com/p/97c7c1a87244
0
Upvotes
1
u/billie_parker Nov 19 '22
There's only one use. To define an anonymous function. These "five," are just slight variations on that.
1
1
u/avesliving Nov 19 '22
This is really interesting and a good overview.
Am I the only one who finds lambda functions inherently less readable? Take the interview question. Apparently the great programmer will jam all of his logic into one line and that's more elegant? What about more readable and thus more maintainable? At what point did that stop being important?
I guess I just find it interesting that I looked through this and found lambdas or anonymous functions not really useful for any projects I work on currently.