Please check below code.
I initialized a dict and send it to a function f. I checked the address of return_dict. It is not changing inside the process. So I thought the dict should be updated
But it is not updated, so why?
from multiprocessing import Process
return_dict = dict({})
print id(return_dict)
def f(value, return_dict):
return_dict['value'] = value
print return_dict
p = Process(target=f, args=(100, return_dict))
p.start()
p.join()
print return_dict