New submission from Juan José Conti <jjco...@gmail.com>: I expected I could iterate over a DictProxy as I do over a regular dict.
>>> from multiprocessing import Manager >>> m = Manager() >>> d = m.dict() >>> d <DictProxy object, typeid 'dict' at 0x98a240c> >>> for x in d: ... print x ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 2, in __getitem__ File "/usr/lib/python2.6/multiprocessing/managers.py", line 740, in _callmethod raise convert_to_error(kind, result) KeyError: 0 >>> d['a'] = 1 >>> for x in d: ... print x ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 2, in __getitem__ File "/usr/lib/python2.6/multiprocessing/managers.py", line 740, in _callmethod raise convert_to_error(kind, result) KeyError: 0 ---------- components: Library (Lib) messages: 115302 nosy: jjconti priority: normal severity: normal status: open title: Can't iterate over multiprocessing.managers.DictProxy versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9733> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com