Message327133
Currently, memoryview values can be assigned from all bytes-like objects (https://docs.python.org/3/glossary.html#term-bytes-like-object) except byte array.array:
----
import array
mview = memoryview(bytearray(b'hello'))
mview[:] = bytes(b'hello') # success
mview[:] = bytearray(b'hello') # success
mview[:] = memoryview(b'hello') # success
mview[:] = array.array('b', b'hello') # fail
----
mview[:] = array.array('b', b'hello')
ValueError: memoryview assignment: lvalue and rvalue have different structures
---- |
|
| Date |
User |
Action |
Args |
| 2018-10-05 12:24:52 | aparamon | set | recipients:
+ aparamon |
| 2018-10-05 12:24:52 | aparamon | set | messageid: <1538742292.09.0.545547206417.issue34905@psf.upfronthosting.co.za> |
| 2018-10-05 12:24:52 | aparamon | link | issue34905 messages |
| 2018-10-05 12:24:51 | aparamon | create | |
|