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 serhiy.storchaka
Recipients serhiy.storchaka, vstinner, wolma
Date 2015-03-17.16:05:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426608329.84.0.294073087995.issue23688@psf.upfronthosting.co.za>
In-reply-to
Content
memoryview is converted to bytes because len() for memoryview returns a size of first dimension (a number of items for one-dimension view), not a number of bytes.

>>> m = memoryview(array.array('I', [1, 2, 3]))
>>> len(m)
3
>>> len(m.tobytes())
12
>>> len(m.cast('B'))
12
History
Date User Action Args
2015-03-17 16:05:29serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, wolma
2015-03-17 16:05:29serhiy.storchakasetmessageid: <1426608329.84.0.294073087995.issue23688@psf.upfronthosting.co.za>
2015-03-17 16:05:29serhiy.storchakalinkissue23688 messages
2015-03-17 16:05:29serhiy.storchakacreate