#16518: Bring error messages in harmony with docs ("bytes-like object")

Some time ago we changed the docs to consistently use the term 'bytes-like
object' in all the contexts where bytes, bytearray, memoryview, etc are used.
This patch (by Ezio Melotti) completes that work by changing the error
messages that previously reported that certain types did "not support the
buffer interface" to instead say that a bytes-like object is required.  (The
glossary entry for bytes-like object references the discussion of the buffer
protocol in the docs.)
This commit is contained in:
R David Murray 2014-10-05 11:47:01 -04:00
parent d577cea8ab
commit 861470c836
11 changed files with 30 additions and 22 deletions

View file

@ -4873,9 +4873,7 @@ PyDoc_STRVAR(long_from_bytes_doc,
\n\
Return the integer represented by the given array of bytes.\n\
\n\
The bytes argument must either support the buffer protocol or be an\n\
iterable object producing bytes. Bytes and bytearray are examples of\n\
built-in objects that support the buffer protocol.\n\
The bytes argument must be a bytes-like object (e.g. bytes or bytearray).\n\
\n\
The byteorder argument determines the byte order used to represent the\n\
integer. If byteorder is 'big', the most significant byte is at the\n\