summaryrefslogtreecommitdiff
path: root/Modules/_operator.c
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-10-05 11:47:01 -0400
committerR David Murray <rdmurray@bitdance.com>2014-10-05 11:47:01 -0400
commit861470c83607a4312d3c65bce3e18414b965e586 (patch)
tree48088d67e50d8599b00498c17b5c8b7a35b482f8 /Modules/_operator.c
parentd577cea8ab0d929c40de93947dd68b9709607b35 (diff)
downloadcpython-git-861470c83607a4312d3c65bce3e18414b965e586.tar.gz
#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 'Modules/_operator.c')
-rw-r--r--Modules/_operator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_operator.c b/Modules/_operator.c
index 9c5c0d206a..8f524a6449 100644
--- a/Modules/_operator.c
+++ b/Modules/_operator.c
@@ -241,7 +241,7 @@ PyDoc_STRVAR(compare_digest__doc__,
"Return 'a == b'. This function uses an approach designed to prevent\n"
"timing analysis, making it appropriate for cryptography.\n"
"a and b must both be of the same type: either str (ASCII only),\n"
-"or any type that supports the buffer protocol (e.g. bytes).\n"
+"or any bytes-like object.\n"
"\n"
"Note: If a and b are of different lengths, or if an error occurs,\n"
"a timing attack could theoretically reveal information about the\n"