4 ms·
I think he's complaining about the fact that lambdas in Python can't be multiline. The equivalent in Javascript can be as big as you want. That means in Python
by pc2g4d 9y ago
I think he's complaining about the fact that lambdas in Python can't be multiline. The equivalent in Javascript can be as big as you want. That means in Python you have to separately define your function and then refer to it, whereas in JS you can just give it all in one go.
JS:
doThing(function(){
blah();
de();
blah();
});
Python:
def thing_doer():
blah()
de()
blah()
doThing(thing_doer)