Is multiprocessing.Manager().dict().setdefault() broken?

后端 未结 3 1935
抹茶落季
抹茶落季 2021-01-05 03:00

The its-late-and-im-probably-stupid department presents:

>>> import multiprocessing
>>> mgr = multiprocessing.Manager()
>>> d = mg         


        
3条回答
  •  逝去的感伤
    2021-01-05 03:55

    items() returns a copy. Appending to a copy does not affect the original. Did you mean this?

    >>> d['foo'] =({'bar': 'baz'})
    >>> print d.items()
    [('foo', {'bar': 'baz'})]
    

提交回复
热议问题