From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 26 Dec 2018 02:00:20 +0000 (-0800) Subject: Redo PR 785 -- Add cross reference links (GH-11319) (#11320) X-Git-Tag: v3.7.3rc1~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=793ebdfc55685d7e4a23a549ca56b61715638f82;p=thirdparty%2FPython%2Fcpython.git Redo PR 785 -- Add cross reference links (GH-11319) (#11320) (cherry picked from commit 56edf3a4b145d80684a9e4ba7411a6778d830140) Co-authored-by: Raymond Hettinger --- diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst index a4efef846572..89ecddc7780f 100644 --- a/Doc/library/binascii.rst +++ b/Doc/library/binascii.rst @@ -152,6 +152,8 @@ The :mod:`binascii` module defines the following functions: *data* is converted into the corresponding 2-digit hex representation. The returned bytes object is therefore twice as long as the length of *data*. + Similar functionality (but returning a text string) is also conveniently + accessible using the :meth:`bytes.hex` method. .. function:: a2b_hex(hexstr) unhexlify(hexstr) @@ -161,6 +163,9 @@ The :mod:`binascii` module defines the following functions: of hexadecimal digits (which can be upper or lower case), otherwise an :exc:`Error` exception is raised. + Similar functionality (accepting only text string arguments, but more + liberal towards whitespace) is also accessible using the + :meth:`bytes.fromhex` class method. .. exception:: Error