New submission from munky :
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!
--
components: Library (Lib)
messages: 415353
nosy: munky9
priority: normal
severity: normal
status: open
title: Nested list in Dict, multiprocessing manager
type: behavior
___
Python tracker
<https://bugs.python.org/issue47036>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com