Message240660
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# |
|
Date |
User |
Action |
Args |
2015-04-13 16:53:54 | larry | set | recipients:
+ larry, zach.ware, serhiy.storchaka |
2015-04-13 16:53:53 | larry | set | messageid: <1428944034.0.0.309169492838.issue23935@psf.upfronthosting.co.za> |
2015-04-13 16:53:53 | larry | link | issue23935 messages |
2015-04-13 16:53:53 | larry | create | |
|