r/Python • Python Morsels • Sep 27 '18

Stop writing lambda expressions in Python

http://treyhunner.com/2018/09/stop-writing-lambda-expressions/
0 Upvotes

26 comments sorted by

View all comments

3

u/Axxhelairon Sep 27 '18

i never buy into the idea that you shouldnt use something slightly unconventional because others might not understand it when its a core part of the language, dinosaur regressive thinking like this would stop anyone from using completely basic languages features like tuple destructuring, * unpacking, decorators, ** kwargs unpacking, partial function applicators, etc because you're too scared to learn something new

id say dont use lambdas for anything complex because they're a half baked implementation and are restricted to being expression bodies and fitting things in one line makes it actually unreadable, id just think you're being stubborn if lamda a, b: a * b takes you more than two minutes to figure out without even knowing what a lamda is or think that its hard to understand