-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-144027: Fix documentation for ignorechars in base64.a85decode() #144028
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
base: main
Are you sure you want to change the base?
gh-144027: Fix documentation for ignorechars in base64.a85decode() #144028
Conversation
It does not support an ASCII string. Also add more tests.
vstinner
left a comment
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.
LGTM
|
|
||
| *ignorechars* should be a :term:`bytes-like object` or ASCII string | ||
| containing characters to ignore | ||
| *ignorechars* should be a byte string containing characters to ignore |
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.
As noted on the issue, I think bytes-like object is correct here.
| with self.assertRaises(TypeError): | ||
| base64.a85decode(b"a b\nc", ignorechars=" \n") | ||
| with self.assertRaises(TypeError): | ||
| base64.a85decode(b"a b\nc", ignorechars=None) |
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.
You could also add passing tests for bytearray, array.array, and memoryview here for the ignorechars argument if we want to be complete?
|
When you're done making the requested changes, leave the comment: |
It does not support an ASCII string.
Also add more tests.
📚 Documentation preview 📚: https://cpython-previews--144028.org.readthedocs.build/