I have the following code:
def f1():
print("f1")
def f2():
print("f2")
flist = [f1,f2]
list(map(lambda x: x(), flist))
I need to get rid of lambda because it cannot be dumped using pickle.
Is there any function or construction that runs the function received as parameter ?
Here is the actually code I need to modify and remove the helper function "call":
from multiprocessing import Pool
def call(x):
x()
p = Pool()
p.map(call, func_list)