Skip to content

Commit 3f8726d

Browse files
binionaCAM-Gerlach
andauthored
Apply suggestions from code review
Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent fe7323b commit 3f8726d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Doc/library/base64.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@
1414
--------------
1515

1616
This module provides functions for encoding binary data to printable
17-
ASCII characters and decoding such encodings back to binary data,
18-
such as :ref:`those specified in RFC 4648 <base_64_rfc_4648>` and
19-
:ref:`Base85 encodings <base_64_base_85>`.
17+
ASCII characters and decoding such encodings back to binary data.
18+
This includes the :ref:`encodings specified in <base64-rfc-4648>`
19+
:rfc:`4648` (Base64, Base32 and Base16)
20+
and the non-standard :ref:`Base85 encodings <base64-base-85>`.
2021

2122
There are two interfaces provided by this module. The modern interface
2223
supports encoding :term:`bytes-like objects <bytes-like object>` to ASCII
2324
:class:`bytes`, and decoding :term:`bytes-like objects <bytes-like object>` or
2425
strings containing ASCII to :class:`bytes`. Both base-64 alphabets
2526
defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported.
2627

27-
The :ref:`legacy interface <base_64_legacy>` does not support decoding from strings, but it does
28+
The :ref:`legacy interface <base-64-legacy>` does not support decoding from strings, but it does
2829
provide functions for encoding and decoding to and from :term:`file objects
2930
<file object>`. It only supports the Base64 standard alphabet, and it adds
3031
newlines every 76 characters as per :rfc:`2045`. Note that if you are looking
@@ -41,15 +42,14 @@ package instead.
4142
encoding and decoding functions in this module. Ascii85/Base85 support added.
4243

4344

44-
.. _base_64_rfc_4648:
45+
.. _base64-rfc-4648:
4546

4647
RFC 4648 Encodings
4748
------------------
4849

4950
The :rfc:`4648` encodings are suitable for encoding binary data so that it can be
5051
safely sent by email, used as parts of URLs, or included as part of an HTTP
51-
POST request. The encoding algorithm is not the same as the
52-
:program:`uuencode` program.
52+
POST request.
5353

5454
.. function:: b64encode(s, altchars=None)
5555

@@ -184,17 +184,17 @@ POST request. The encoding algorithm is not the same as the
184184
incorrectly padded or if there are non-alphabet characters present in the
185185
input.
186186

187-
.. _base_64_base_85:
187+
.. _base64-base-85:
188188

189189
Base85 Encodings
190190
-----------------
191191

192-
Base85 encoding is not formally specified. Base85 encoding is a de facto standard,
193-
and different systems perform the encoding differently.
192+
Base85 encoding is not formally specified but rather a de facto standard,
193+
thus different systems perform the encoding differently.
194194

195195
The :func:`a85encode` and :func:`b85encode` functions in this module are two implementations of
196-
the de facto standard. Which function you should use depends on how the other
197-
software you use implements the Base85 encoding.
196+
the de facto standard. You should call the function with the Base85
197+
implementation used by the software you intend to work with.
198198

199199
The two functions present in this module differ in how they handle the following:
200200

@@ -285,7 +285,7 @@ Refer to the documentation of the individual functions for more information.
285285
.. versionadded:: 3.13
286286

287287

288-
.. _base_64_legacy:
288+
.. _base64-legacy:
289289

290290
Legacy Interface
291291
----------------

0 commit comments

Comments
 (0)