From: R David Murray Date: Sun, 3 Nov 2013 18:21:38 +0000 (-0500) Subject: #19411: Clarify that b2a_hex/hexlify returns a bytes object. X-Git-Tag: v3.4.0b1~409^2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fdb64b5a0a8567a232c2182f0c0439872c987e2;p=thirdparty%2FPython%2Fcpython.git #19411: Clarify that b2a_hex/hexlify returns a bytes object. Initial patch by Vajrasky Kok. --- diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst index 02ec5d854a94..c92a8e160a97 100644 --- a/Doc/library/binascii.rst +++ b/Doc/library/binascii.rst @@ -145,7 +145,7 @@ The :mod:`binascii` module defines the following functions: 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 index 340ec9c42603..a84badc7c934 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -1129,7 +1129,8 @@ binascii_hexlify(PyObject *self, PyObject *args) 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