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 munky99999
Recipients munky99999
Date 2022-03-16.17:16:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647451009.46.0.388425415857.issue47036@roundup.psfhosted.org>
In-reply-to
Content
Sorry for this post but I found an unusual behaviour.

from multiprocessing import Manager
manager = Manager()

managerdict = manager.dict()

managerdict["first"]= {"stat" : [0,1]}

managerdict["first"]["stat"][0] += 1
managerdict["first"]["stat"][1] += 1

print(managerdict)

anotherdict = {}
anotherdict['foo'] = {"stat" : [0, 1]}
anotherdict['foo']["stat"][0] += 1
anotherdict['foo']["stat"][1] += 1

print(anotherdict)

Which outputs:

{'first': {'stat': [0, 1]}}
{'foo': {'stat': [1, 2]}}

What am I doing wrong?

Thanks!
History
Date User Action Args
2022-03-16 17:16:49munky99999setrecipients: + munky99999
2022-03-16 17:16:49munky99999setmessageid: <1647451009.46.0.388425415857.issue47036@roundup.psfhosted.org>
2022-03-16 17:16:49munky99999linkissue47036 messages
2022-03-16 17:16:49munky99999create