From 647ff387d9ed593248f238d630a541f08947703a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 3 May 2018 09:34:43 -0500 Subject: docs: fix references to ubinascii --- docs/library/binascii.rst | 40 ++++++++++++++++++++++++++++++++++++++++ docs/library/index.rst | 2 +- docs/library/network.rst | 2 +- docs/library/ubinascii.rst | 42 ------------------------------------------ docs/library/uhashlib.rst | 2 +- 5 files changed, 43 insertions(+), 45 deletions(-) create mode 100644 docs/library/binascii.rst delete mode 100644 docs/library/ubinascii.rst (limited to 'docs') diff --git a/docs/library/binascii.rst b/docs/library/binascii.rst new file mode 100644 index 000000000..e4878a6fa --- /dev/null +++ b/docs/library/binascii.rst @@ -0,0 +1,40 @@ +:mod:`binascii` -- binary/ASCII conversions +============================================ + +.. module:: binascii + :synopsis: binary/ASCII conversions + +|see_cpython_module| :mod:`cpython:binascii`. + +This module implements conversions between binary data and various +encodings of it in ASCII form (in both directions). + +Functions +--------- + +.. function:: hexlify(data, [sep]) + + Convert binary data to hexadecimal representation. Returns bytes string. + + .. admonition:: Difference to CPython + :class: attention + + If additional argument, *sep* is supplied, it is used as a separator + between hexadecimal values. + +.. function:: unhexlify(data) + + Convert hexadecimal data to binary representation. Returns bytes string. + (i.e. inverse of hexlify) + +.. function:: a2b_base64(data) + + Decode base64-encoded data, ignoring invalid characters in the input. + Conforms to `RFC 2045 s.6.8 `_. + Returns a bytes object. + +.. function:: b2a_base64(data) + + Encode binary data in base64 format, as in `RFC 3548 + `_. Returns the encoded data + followed by a newline character, as a bytes object. diff --git a/docs/library/index.rst b/docs/library/index.rst index 647a25c8a..804bff93c 100644 --- a/docs/library/index.rst +++ b/docs/library/index.rst @@ -20,7 +20,7 @@ Python standard libraries and micro-libraries array.rst gc.rst sys.rst - ubinascii.rst + binascii.rst ucollections.rst uerrno.rst uhashlib.rst diff --git a/docs/library/network.rst b/docs/library/network.rst index 60c9756db..d25f9f388 100644 --- a/docs/library/network.rst +++ b/docs/library/network.rst @@ -202,7 +202,7 @@ Methods (ssid, bssid, channel, RSSI, authmode, hidden) *bssid* is hardware address of an access point, in binary form, returned as - bytes object. You can use `ubinascii.hexlify()` to convert it to ASCII form. + bytes object. You can use `binascii.hexlify()` to convert it to ASCII form. There are five values for authmode: diff --git a/docs/library/ubinascii.rst b/docs/library/ubinascii.rst deleted file mode 100644 index edf4a9fdf..000000000 --- a/docs/library/ubinascii.rst +++ /dev/null @@ -1,42 +0,0 @@ -:mod:`ubinascii` -- binary/ASCII conversions -============================================ - -.. include:: ../templates/unsupported_in_circuitpython.inc - -.. module:: ubinascii - :synopsis: binary/ASCII conversions - -|see_cpython_module| :mod:`cpython:binascii`. - -This module implements conversions between binary data and various -encodings of it in ASCII form (in both directions). - -Functions ---------- - -.. function:: hexlify(data, [sep]) - - Convert binary data to hexadecimal representation. Returns bytes string. - - .. admonition:: Difference to CPython - :class: attention - - If additional argument, *sep* is supplied, it is used as a separator - between hexadecimal values. - -.. function:: unhexlify(data) - - Convert hexadecimal data to binary representation. Returns bytes string. - (i.e. inverse of hexlify) - -.. function:: a2b_base64(data) - - Decode base64-encoded data, ignoring invalid characters in the input. - Conforms to `RFC 2045 s.6.8 `_. - Returns a bytes object. - -.. function:: b2a_base64(data) - - Encode binary data in base64 format, as in `RFC 3548 - `_. Returns the encoded data - followed by a newline character, as a bytes object. diff --git a/docs/library/uhashlib.rst b/docs/library/uhashlib.rst index 0f20413f7..d0a3422a2 100644 --- a/docs/library/uhashlib.rst +++ b/docs/library/uhashlib.rst @@ -55,5 +55,5 @@ Methods .. method:: hash.hexdigest() - This method is NOT implemented. Use ``ubinascii.hexlify(hash.digest())`` + This method is NOT implemented. Use ``binascii.hexlify(hash.digest())`` to achieve a similar effect. -- cgit v1.2.3