Skip to content

Commit fbb9798

Browse files
committed
Note that b64decode and b64encode may raise a ValueError
1 parent 1d6e480 commit fbb9798

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/base64.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The modern interface provides:
5858
This allows an application to e.g. generate URL or filesystem safe Base64
5959
strings. The default is ``None``, for which the standard Base64 alphabet is used.
6060

61-
Raises an :exc:`AssertionError` if the length of *altchars* is not 2. Raises a
61+
May assert or raise a a :exc:`ValueError` if the length of *altchars* is not 2. Raises a
6262
:exc:`TypeError` if *altchars* is not a :term:`bytes-like object`.
6363

6464

@@ -82,7 +82,7 @@ The modern interface provides:
8282

8383
For more information about the strict base64 check, see :func:`binascii.a2b_base64`
8484

85-
Raises an :exc:`AssertionError` if the length of *altchars* is not 2.
85+
May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2.
8686

8787
.. function:: standard_b64encode(s)
8888

0 commit comments

Comments
 (0)