diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index 529a7242443820..f9e0e40662ac1b 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -74,8 +74,11 @@ POST request. of length 2 which specifies the alternative alphabet used instead of the ``+`` and ``/`` characters. - A :exc:`binascii.Error` exception is raised - if *s* is incorrectly padded. + A :exc:`binascii.Error` exception is raised if *s* contains incorrect padding. + When *validate* is ``False`` (the default), extra padding characters and + discontinuous padding characters (``=`` characters in the middle of the payload) + are silently ignored. When *validate* is ``True``, such incorrect padding + will result in a :exc:`binascii.Error`. If *validate* is ``False`` (the default), characters that are neither in the normal base-64 alphabet nor the alternative alphabet are