py.user added the comment:

Also memoryview() doesn't support:

>>> m = memoryview(bytearray(b'abcde'))
>>> m[::2] = ()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' does not support the buffer interface
>>> m[::2] = b''
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: memoryview assignment: lvalue and rvalue have different structures
>>> m[::2] = b'123'
>>> m.tobytes()
b'1b2d3'
>>>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12606>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to