[docs] [issue16518] add "buffer protocol" to glossary
Stefan Krah
report at bugs.python.org
Sat Nov 24 00:18:03 CET 2012
Stefan Krah added the comment:
Antoine Pitrou <report at bugs.python.org> wrote:
> > How about "object does not provide a byte buffer" for error messages
> > and "(byte) buffer provider" as a shorthand for "any buffer provider
> > that exposes its memory as a sequence of unsigned bytes in response
> > to a PyBUF_SIMPLE request"?
>
> It's not too bad, I think. However, what I think is important is that
> the average (non-expert) Python developer understand that the function
> really accepts a bytes object, and other similar types (because, really,
> bytes is the only bytes-like type most developers will ever face).
> That's why I'm proposing "bytes-like object".
If it is somehow possible to establish the term as a shorthand for the real
meaning, then I guess it's the most economical option for documenting Python
methods (I don't think it should be used in the C-API docs though).
help (b''.join) for example would sound better with "bytes-like object"
than with "(byte) buffer provider".
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16518>
_______________________________________
More information about the docs
mailing list