➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aparamon
Recipients aparamon
Date 2018-10-05.12:24:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538742292.09.0.545547206417.issue34905@psf.upfronthosting.co.za>
In-reply-to
Content
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
----
History
Date User Action Args
2018-10-05 12:24:52aparamonsetrecipients: + aparamon
2018-10-05 12:24:52aparamonsetmessageid: <1538742292.09.0.545547206417.issue34905@psf.upfronthosting.co.za>
2018-10-05 12:24:52aparamonlinkissue34905 messages
2018-10-05 12:24:51aparamoncreate