Author r.david.murray
Recipients Isobel Hooper, barry, docs@python, loewis, martin.panter, ncoghlan, r.david.murray, slinkp
Date 2015-12-18.02:51:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450407070.41.0.266493460736.issue1753718@psf.upfronthosting.co.za>
In-reply-to
Content
The intent of the term "bytes-like object" it to make it possible to use it in documentation in the way I have used it here.  That the buffer has a len is clearly discussed in the Buffer Protocol documentation, but of course that's only talking about the C level API.  Perhaps what is needed is an addition to the bytes-like object description that clarifies that a bytes-like object is a Sequence that supports the buffer protocol?  (So: "A Sequence object that supports the Buffer Protocol and...")  Do we also need to clarify that the item size must be one byte?  That would seem to me to be implicit in the name.

I don't know if what ctypes produces is a bytes-like object in this sense, since I don't understand ctypes very well, but it sounds like it isn't.  Trying to wrap it in a memoryview gives an error ('unsupported format <c'), so I suspect it is not.

I'm adding Nick to nosy, since the commit log says he added the bytes-like object support to this module.
History
Date User Action Args
2015-12-18 02:51:10r.david.murraysetrecipients: + r.david.murray, loewis, barry, ncoghlan, slinkp, docs@python, martin.panter, Isobel Hooper
2015-12-18 02:51:10r.david.murraysetmessageid: <1450407070.41.0.266493460736.issue1753718@psf.upfronthosting.co.za>
2015-12-18 02:51:10r.david.murraylinkissue1753718 messages
2015-12-18 02:51:09r.david.murraycreate