Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
collyw
· 10y ago · 0 comments
How are they a hack in Python?
Comments
[–]
randomguy1254
10y ago
lambda bodies can only be a single expression
[–]
collyw
OP
10y ago
There is more to functional programing in python than lambda functions. Normal functions can be created and passed around.
[–]
randomguy1254
10y ago
Sure, but I think that is the point. You can do that, but its not as convenient and becomes harder to read. And besides, those are free functions you speak of, not closures. To emulate multi-line closures becomes even more obtuse.
[–]
collyw
OP
10y ago
I find it more readable than lambda function syntax personally. And still way nicer than messing around in JavaScript.