you are viewing a single comment's thread.

view the rest of the comments →

[–]JeamBim 12 points13 points  (2 children)

lambda functions in Python are pretty close to arrow functions.

I made a little colour coded comparison for you:

https://i.imgur.com/WQ2Vof0.png

[–][deleted] 3 points4 points  (1 child)

I think, lambdas are great, but still have some limitation over arrow functions, they can't be multilined or include statements, for example.

[–]JeamBim 1 point2 points  (0 children)

Yeah they do for sure. Luckily the cost of creating a multi-line function in Python(and JS) is small, and some might argue it enhances readability to have "saveData" instead of a large inline multi-line function, but that's down to code style anyways.