Comment by skeledrew
Interesting. I see HN has mangled my code block onto 1 line and replaced a couple stars, but the fixup should be obvious...
Yes, it is, it should, and that's exactly the point. It'd look janky even without the `[-1]`, and this is what the core devs are trying to protect against. Lambdas are anonymous functions meant only to be used in places where expressions are valid, such as function parameters and return values. There's even a linter warning if you assign one to a variable. All to help reduce the creation of janky-looking code, and that's a huge benefit for most developers.
But what if I want to use lambdas for more things?
Imperative programming only gets you so far.
Maybe this is a sign that people are using Python for grander things than it was designed for?