[Python-checkins] cpython (3.3): #19411: Clarify that b2a_hex/hexlify returns a bytes object.
r.david.murray
python-checkins at python.org
Sun Nov 3 19:22:44 CET 2013
http://hg.python.org/cpython/rev/25d89a4faede
changeset: 86889:25d89a4faede
branch: 3.3
parent: 86887:c574951deadd
user: R David Murray <rdmurray at bitdance.com>
date: Sun Nov 03 13:21:38 2013 -0500
summary:
#19411: Clarify that b2a_hex/hexlify returns a bytes object.
Initial patch by Vajrasky Kok.
files:
Doc/library/binascii.rst | 2 +-
Modules/binascii.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst
--- a/Doc/library/binascii.rst
+++ b/Doc/library/binascii.rst
@@ -145,7 +145,7 @@
Return the hexadecimal representation of the binary *data*. Every byte of
*data* is converted into the corresponding 2-digit hex representation. The
- resulting string is therefore twice as long as the length of *data*.
+ returned bytes object is therefore twice as long as the length of *data*.
.. function:: a2b_hex(hexstr)
diff --git a/Modules/binascii.c b/Modules/binascii.c
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -1129,7 +1129,8 @@
PyDoc_STRVAR(doc_hexlify,
"b2a_hex(data) -> s; Hexadecimal representation of binary data.\n\
\n\
-This function is also available as \"hexlify()\".");
+The return value is a bytes object. This function is also\n\
+available as \"hexlify()\".");
static int
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list