Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Doc/library/base64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ POST request.

If *padded* is true, the last group of 4 base 64 alphabet characters must
be padded with the '=' character.
If *padded* is false, the '=' character is treated as other non-alphabet
characters (depending on the value of *validate* and *ignorechars*).
If *padded* is false, padding is neither required nor recognized:
the '=' character is not treated as padding but as a non-alphabet
character, which means it is silently discarded when *validate* is false,
or causes an :exc:`~binascii.Error` when *validate* is true unless
b'=' is included in *ignorechars*.

A :exc:`binascii.Error` exception is raised
if *s* is incorrectly padded.
Expand Down Expand Up @@ -194,8 +197,10 @@ POST request.

If *padded* is true, the last group of 8 base 32 alphabet characters must
be padded with the '=' character.
If *padded* is false, the '=' character is treated as other non-alphabet
characters (depending on the value of *ignorechars*).
If *padded* is false, padding is neither required nor recognized:
the '=' character is not treated as padding but as a non-alphabet
character, which means it raises an :exc:`~binascii.Error` unless
b'=' is included in *ignorechars*.

*ignorechars* should be a :term:`bytes-like object` containing characters
to ignore from the input.
Expand Down
7 changes: 5 additions & 2 deletions Doc/library/binascii.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ The :mod:`!binascii` module defines the following functions:

If *padded* is true, the last group of 4 base 64 alphabet characters must
be padded with the '=' character.
If *padded* is false, the '=' character is treated as other non-alphabet
characters (depending on the value of *strict_mode* and *ignorechars*).
If *padded* is false, padding is neither required nor recognized:
the '=' character is not treated as padding but as a non-alphabet
character, which means it is silently discarded when *strict_mode* is false,
or causes an :exc:`~binascii.Error` when *strict_mode* is true unless
b'=' is included in *ignorechars*.

If *ignorechars* is specified, it should be a :term:`bytes-like object`
containing characters to ignore from the input when *strict_mode* is true.
Expand Down
Loading