I need to monkey-patch my library to replace an instance of a symbol, and it\'s getting referenced by some function closures. I need to copy those functions (since I also ne
in lambda:
def make_cell(value): fn = (lambda x: lambda: x)(value) return fn.__closure__[0]
got anwer from https://github.com/nedbat/byterun/blob/master/byterun/pyobj.py#L12