[Python-checkins] cpython (merge 3.3 -> default): Merge #19411: Clarify that b2a_hex/hexlify returns a bytes object.

r.david.murray python-checkins at python.org
Sun Nov 3 19:22:46 CET 2013


http://hg.python.org/cpython/rev/ac190d03aed5
changeset:   86890:ac190d03aed5
parent:      86888:e3180c58a78c
parent:      86889:25d89a4faede
user:        R David Murray <rdmurray at bitdance.com>
date:        Sun Nov 03 13:22:17 2013 -0500
summary:
  Merge #19411: Clarify that b2a_hex/hexlify returns a bytes object.

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
@@ -1122,7 +1122,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