diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-10-05 15:47:01 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-10-05 15:47:01 (GMT) |
commit | 861470c83607a4312d3c65bce3e18414b965e586 (patch) | |
tree | 48088d67e50d8599b00498c17b5c8b7a35b482f8 /Objects/longobject.c | |
parent | d577cea8ab0d929c40de93947dd68b9709607b35 (diff) | |
download | cpython-861470c83607a4312d3c65bce3e18414b965e586.zip cpython-861470c83607a4312d3c65bce3e18414b965e586.tar.gz cpython-861470c83607a4312d3c65bce3e18414b965e586.tar.bz2 |
#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.)
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index bb2eb17..27bee50 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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\ |