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 martin.panter
Recipients cblp, dabeaz, josh.r, martin.panter, pitrou, skrah
Date 2015-08-06.00:44:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1438821845.38.0.0232146751723.issue15944@psf.upfronthosting.co.za>
In-reply-to
Content
In my experience, I tend to only use memoryview() for “bytes-like” buffers (but see Issue 23756 about clarifying what this means). Example from /Lib/_compression.py:67:

def readinto(self, b):
    with memoryview(b) as view, view.cast("B") as byte_view:
        data = self.read(len(byte_view))
        byte_view[:len(data)] = data
    return len(data)

Fixing cast("B") or adding a memoryview(raw=True) mode could probably help when all you want is a byte buffer.
History
Date User Action Args
2015-08-06 00:44:05martin.pantersetrecipients: + martin.panter, pitrou, skrah, dabeaz, cblp, josh.r
2015-08-06 00:44:05martin.pantersetmessageid: <1438821845.38.0.0232146751723.issue15944@psf.upfronthosting.co.za>
2015-08-06 00:44:05martin.panterlinkissue15944 messages
2015-08-06 00:44:04martin.pantercreate