Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56edf3a

Browse files
authored
Redo PR 785 -- Add cross reference links (GH-11319)
1 parent b6af23e commit 56edf3a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/library/binascii.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ The :mod:`binascii` module defines the following functions:
152152
*data* is converted into the corresponding 2-digit hex representation. The
153153
returned bytes object is therefore twice as long as the length of *data*.
154154

155+
Similar functionality (but returning a text string) is also conveniently
156+
accessible using the :meth:`bytes.hex` method.
155157

156158
.. function:: a2b_hex(hexstr)
157159
unhexlify(hexstr)
@@ -161,6 +163,9 @@ The :mod:`binascii` module defines the following functions:
161163
of hexadecimal digits (which can be upper or lower case), otherwise an
162164
:exc:`Error` exception is raised.
163165

166+
Similar functionality (accepting only text string arguments, but more
167+
liberal towards whitespace) is also accessible using the
168+
:meth:`bytes.fromhex` class method.
164169

165170
.. exception:: Error
166171

0 commit comments

Comments
 (0)