gh-103134: Update multiprocessing.managers.ListProxy and multiprocessing.managers.DictProxy by invisibleroads · Pull Request #103133 · python/cpython
```
from multiprocessing import Manager
with Manager() as manager:
xs = manager.list()
xs.clear()
```
For now, we can use the workaround `del xs[:]`
invisibleroads
changed the title
Add support for manager.list().clear()
gh-103134: Add support for manager.list().clear()
```
from multiprocessing import Manager
with Manager() as manager:
xs = manager.list()
xs.clear
xs.copy
d = manager.dict()
d | {} # __or__
{} | d # __ror__
reversed(d) # __reversed__
d.fromkeys
```
suggested by @terryjreedy
tested manually in Python 3.10.8
python#103134
invisibleroads
changed the title
gh-103134: Add support for manager.list().clear()
gh-103134: Update multiprocessing.managers.ListProxy and multiprocessing.managers.DictProxy
Check that the dictionary returned by dict_proxy.from_keys is a dict as defined in dict.from_keys as requested by @encukou
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters