Oct-22-2016, 07:00 PM
import multiprocessing as mp
def bar(**kwargs):
for a in kwargs:
print a,kwargs[a]
arguments={'name':'Joe','age':20}
p=mp.Pool(processes=4)
p.map(bar,**arguments)
p.close()
p.join()Errors:Traceback (most recent call last):
File "post.py", line 9, in <module>
p.map(bar,**arguments)
TypeError: map() got an unexpected keyword argument 'age'
How do I pass the dictionary arguments?
Thank you,
