⚠️ multiprocessing.Manager.dict 使用注意
from multiprocessing import Manager
# 1 md = Manager().dict() md['a'] = ['a'] if 'a' in md.keys(): a = md.get('a') a.append('b') md['a'] = a print(md)
# 2 md = Manager().dict() md['a'] = ['a'] if 'a' in md.keys(): md['a'].append('b') print(md)
#1 {'a': ['a', 'b']}
#2 {'a': ['a']}