Skip to content

Commit 4c82070

Browse files
committed
Address more reviewer feedback
- Revise docs - Add whatsnew entry - Minor whitespace change in tests
1 parent 6f80c54 commit 4c82070

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

Doc/library/binascii.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ The :mod:`!binascii` module defines the following functions:
193193
in the range from ``0`` to ``2 ** 40 - 1``, inclusive.
194194

195195
.. note::
196-
By default, this function does not map lowercase characters (which are
197-
invalid in standard base32) to their uppercase counterparts, nor does
198-
it contextually map ``0`` to ``O`` and ``1`` to ``I``/``L`` as
199-
:rfc:`4648` allows.
196+
This function does not map lowercase characters (which are invalid in
197+
standard base32) to their uppercase counterparts, nor does it
198+
contextually map ``0`` to ``O`` and ``1`` to ``I``/``L`` as :rfc:`4648`
199+
allows.
200200

201201
Optional *alphabet* must be a :class:`bytes` object of length 32 which
202202
specifies an alternative alphabet.
@@ -368,6 +368,8 @@ The :mod:`!binascii` module defines the following functions:
368368
.. data:: BASE32HEX_ALPHABET
369369

370370
The "Extended Hex" Base 32 alphabet according to :rfc:`4648`.
371+
Data encoded with this alphabet maintains its sort order during bitwise
372+
comparisons.
371373

372374
.. versionadded:: next
373375

Doc/whatsnew/3.15.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,12 @@ binascii
662662
* Added the *ignorechars* parameter in :func:`~binascii.a2b_base64`.
663663
(Contributed by Serhiy Storchaka in :gh:`144001`.)
664664

665+
* Added functions for Base 32 encoding:
666+
667+
- :func:`~binascii.b2a_base32` and :func:`~binascii.a2b_base32`
668+
669+
(Contributed by James Seo in :gh:`146192`.)
670+
665671

666672
calendar
667673
--------

Lib/test/test_binascii.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def test_constants(self):
7474
b'abcdefghijklmnopqrstuvwxyz'
7575
b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7676
b'.-:+=^!/*?&<>()[]{}@%$#')
77+
7778
self.assertEqual(binascii.BASE32_ALPHABET,
7879
b'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567')
7980
self.assertEqual(binascii.BASE32HEX_ALPHABET,

0 commit comments

Comments
 (0)