Message176262
Antoine Pitrou <report@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". |
|
Date |
User |
Action |
Args |
2012-11-23 23:18:03 | skrah | set | recipients:
+ skrah, terry.reedy, pitrou, ezio.melotti, eric.araujo, chris.jerdonek, docs@python |
2012-11-23 23:18:03 | skrah | link | issue16518 messages |
2012-11-23 23:18:03 | skrah | create | |
|