3 ms·
It seems like an implementation issue of the interpreter no? There’s no reason lambdas _have_ to be this way.
by elteto 5y ago
It seems like an implementation issue of the interpreter no? There’s no reason lambdas _have_ to be this way.
- jonathrg 5y agolambdas don't have names, how could the interpreter possibly improve in this regard?
- zodiakzz 5y agoJS arrow functions don't have names either, it's inferred from the left hand side variable name. Can't Python do something similar?
- jonathrg 5y agoIf you assign a lambda to a variable, you might as well use a def. A more typical use of a lambda is as an arguments to a function call. What would be the name of, say, the first argument to map(lambda x: x*2, numbers)?