gh-139287: Improve the definition of Incorrect padding in base64.rst documents#139301
gh-139287: Improve the definition of Incorrect padding in base64.rst documents#139301LamentXU123 wants to merge 4 commits intopython:mainfrom
Incorrect padding in base64.rst documents#139301Conversation
picnixz
left a comment
There was a problem hiding this comment.
Actually, there is nothing to change. The details about strict padding is already mentioned below:
For more information about the strict base64 check, see :func:
binascii.a2b_base64
We should not expand the docs more as we would otherwise repeat ourselves.
Yeah I saw this before. The link below is about strict mode. But I think the paragraph of
That is the definition of strict_mode, which is not the default mode of |
|
I think the distinction will be too verbose in the end. The documented part for validate is because it's a pre-processing step. By "incorrectly padded", we only mean "if len(s) is invalid" without taking into account extra padding for validate=False. Being overly verbose is not good. What's important is it's possible that In general, users that want to validate the input should just worry about
strict_mode is also false in a2b_base64(). It's just another parameter name. |

Make definition of
Incorrect paddingclearer by adding descriptions about extra padding and discontinuous padding.base64.b64decode#139287📚 Documentation preview 📚: https://cpython-previews--139301.org.readthedocs.build/