-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-139287: Improve the definition of Incorrect padding
in base64.rst
documents
#139301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-139287: Improve the definition of Incorrect padding
in base64.rst
documents
#139301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 padding
clearer by adding descriptions about extra padding and discontinuous padding.base64.b64decode
#139287📚 Documentation preview 📚: https://cpython-previews--139301.org.readthedocs.build/