[issue34905] Cannot assign memoryview values from array.array

2018-10-06 Thread Stefan Krah
Stefan Krah added the comment: >>> mview.format 'B' >>> mview[:] = array.array('B', b'hello') Bytes have format 'B', so this works as expected. -- assignee: -> skrah nosy: +skrah resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue34905] Cannot assign memoryview values from array.array

2018-10-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34905] Cannot assign memoryview values from array.array

2018-10-05 Thread Andrey Paramonov
New submission from Andrey Paramonov : 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') # s