This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terrence
Recipients carlosdf, jnoller, kghose, terrence
Date 2010-01-30.04:06:19
SpamBayes Score 3.40903e-05
Marked as misclassified No
Message-id <>
Kaushik, in your example, d is a dict proxy, so assignment to d['f'] correctly ferries the assignment (a new normal dict) to the d['f'] in the original process.  The new dict, however, is not a dict proxy, it's just a dict, so assignment of d['f']['msg'] goes nowhere.  All hope is not lost, however, because the Manager can be forked to new processes.  The slightly modified example below shows how this works:

from multiprocessing import Process, Manager
def f(m, d):
    d['f'] = m.dict()
    d['f']['msg'] = 'I am here'

m = Manager()
d = m.dict()
p = Process(target=f, args=(m,d))
print d
{'f': <DictProxy object, typeid 'dict' at 0x7f1517902810>}
print d['f']
{'msg': 'I am here'}

With the attached patch, the above works as shown, without, it gives the same output as your original example.
Date User Action Args
2010-01-30 04:06:22terrencesetrecipients: + terrence, jnoller, carlosdf, kghose
2010-01-30 04:06:22terrencesetmessageid: <>
2010-01-30 04:06:20terrencelinkissue6766 messages
2010-01-30 04:06:19terrencecreate