4 ms·
You basically have multi-line lambdas in Python, it's just not anonymous anymore -- you can define function bar inside of function foo and then pass it to anoth
by sevensor 10y ago
You basically have multi-line lambdas in Python, it's just not anonymous anymore -- you can define function bar inside of function foo and then pass it to another function or return it from foo. I've used this to make a function that builds functions for you.