3 ms·
In a way Python is a bad Lisp, still looking forward that catches up in native code compilation and multiline lambdas. Could be better, but that is what mainst
by pjmlp 2y ago
In a way Python is a bad Lisp, still looking forward that catches up in native code compilation and multiline lambdas.
Could be better, but that is what mainstream gets.
- kazinator 2y agoWe can sort of make a shitty multi-line lambda in Python by making a dummy function called progn, and using it, like this: >>> def progn(*args): ... if args: ... return args[-1] ... else: ... return None ... >>> fun = lambda x : progn(print('abc'), ... print(x), ... print('def')) >>> >>> fun(42) abc 42 def :)