3 ms·
what a magnificent trick! feels even more subversive in a "no fun allowed" language / ecosystem as well. i doubt i'll ever have a good reason to use it, but tha
by keeganpoppen 5y ago
what a magnificent trick! feels even more subversive in a "no fun allowed" language / ecosystem as well. i doubt i'll ever have a good reason to use it, but that doesn't mean that i will never use it (muahaha).
- prionassembly 5y agokey_value = Infix(lambda u,v: dict(zip(list(u),list(v)))) Let's goooo.
- cttet 5y agoWe could have sacrilegious Python version that put up all the stuffs lol. Such as multiline lambda :p here: def begin(\*args): return args[-1] begin( func := lambda x, y: begin( z := int(input()), x + y + z ), func(1, 2) )
- pizza 5y agoThat's awesome! My personal opinion; lambdas in Python are really limited relative to their potential. We should be better able to exploit the contrast between "a lambda is an expression" and "a def function is a statement." It would be cool if they could be modified just like classes, I think - keep the original lambdas, and add something else nice like Haskell's Arrows.