News for hackers. Stuff that matters.
Re:SICP: JavaScript Edition available for pre-order by wallscratch on Friday January 21, 2022 @01:00AM (#30019750)
What’s awkward about lambda in python?
Re:SICP: JavaScript Edition available for pre-order by senkora on Friday January 21, 2022 @02:10AM (#30020196)
Python is based on mainly on statements rather than expressions, and lambdas can’t have multiple statements, so writing lambdas is different from writing normal Python code.

In a very real sense, there is no idiomatic way to write complex lambdas in Python. What you would do instead is define a named function and pass it in as an argument. This is fine but definitely more complicated.

Re:SICP: JavaScript Edition available for pre-order by namelosw on Friday January 21, 2022 @02:09AM (#30020191)
- No multi-line support

- Gets very messy when nested

And SICP is a book about learning computer science by abusing lambdas.