4 ms·
I'm guessing, since the author used the arrow shorthand notation in Javascript as an example, that the limitations of Python's lambdas are the chief complaint
by zeugmasyllepsis 9y ago
I'm guessing, since the author used the arrow shorthand notation in Javascript as an example, that the limitations of Python's lambdas are the chief complaint
- dagenleg 9y agoIt's more of a feature than an arbitrary limitation I think. Python philosophy, 'explicit over implicit', and that stuff.
- zeugmasyllepsis 9y agoAn intentional limitation, then :P I tend to agree with the Python philosophy, that it's usually better to extract and name a function that to declare it inline. The `asyncio` module and `await` keywords go a long way in eliminating most use cases where I'd still prefer an anonymous function, for arbitrary callbacks.