New submission from Steven D'Aprano <steve+pyt...@pearwood.info>: multiprocessing.Array slice assignment claims to require a single character even if it requires more than one:
py> arr = multiprocessing.Array('c', 3) py> arr[:] = b'xyz' # works py> arr[:] = 'xyz' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.5/multiprocessing/sharedctypes.py", line 226, in __setitem__ self._obj[i] = value TypeError: one character bytes, bytearray or integer expected ---------- components: Library (Lib) messages: 306066 nosy: steven.daprano priority: normal severity: normal status: open title: mutliprocessing.Array misleading error message in slice assignment type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32005> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com