5313 shaares
127 private links
127 private links
It’s hard for me to teach an in-depth Python class without discussing lambda expressions. I almost always get questions about them. My students tend to see them in code on StackOverflow or they see them in a coworker’s code (which, realistically, may have also come from StackOverflow).
I get a lot of questions about lambda, I’m hesitant to recommend my students embrace Python’s lambda expressions. I have had an aversion to lambda expressions for many years, and since I started teaching Python more regularly a few years ago, my aversion to lambda expressions has only grown stronger.
I’m going to explain how I see lambda expressions and why I tend to recommend my students avoid using them.