At the risk of this blog becoming dedicated to "the worst things you can do in Python" I present to you: multiline lambdas in Python!
Implementation was simple:
import sys
def fun(string):
frame = sys._getframe(1)
out = {}
locals = {}
locals.update(frame.f_globals)
locals.update(frame.f_locals)
exec ("def __anon …