homepage

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 larry
Recipients larry, serhiy.storchaka, zach.ware
Date 2015年04月13日.16:53:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1428944034.0.0.309169492838.issue23935@psf.upfronthosting.co.za>
In-reply-to
Content
Clinic was previously pretty confused about what things accepted "bytes", "bytearray", "buffer", "robuffer", and "rwbuffer". This is because the documentation itself was somewhat confusing.
The documentation was recently cleaned up on these in trunk (including one final fix from me this morning). This patch cleans up Clinic's understanding of how the types map to the format units.
My notes on how the format units map to types is copy & pasted below.
--
the documentation for format units is a little confused, and it is therefore confusing
inside:
getbuffer (buffer)
y* s* z*
 uses PyObject_GetBuffer(arg, view, PyBUF_SIMPLE)
 requires PyBuffer_IsContiguous(view, 'C')
 doesn't check specifically for bytes objects
 handles bytes objects
 accepts bytesarray
 
convertbuffer (robuffer)
y y# s# z#
 handles "read-only buffer object",
 all it really does is ensure it doesn't have a pb_releasebuffer,
 then call getbuffer() above
 so it doesn't accept bytesarray, *just because*
doesn't accept bytes
s z es es#
requires writeable buffer (rwbuffer)
w*
actually checks / specifically handles bytes objects
S
actually checks / specifically handles bytearray objects
Y
actually checks / specifically handles bytes and bytearray objects
c et et#
History
Date User Action Args
2015年04月13日 16:53:54larrysetrecipients: + larry, zach.ware, serhiy.storchaka
2015年04月13日 16:53:53larrysetmessageid: <1428944034.0.0.309169492838.issue23935@psf.upfronthosting.co.za>
2015年04月13日 16:53:53larrylinkissue23935 messages
2015年04月13日 16:53:53larrycreate

AltStyle によって変換されたページ (->オリジナル) /