This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, ned.deily, taleinat
Date 2018-09-22.18:25:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537640720.94.0.956365154283.issue34736@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, I'm having trouble thinking of an alternative message that's both accurate and helpful. I think what I _really_ want as a user is for b64decode to reject strings containing "_" and/or "-" as invalid (assuming altchars has been provided), but that would be a backwards-incompatible change, and has already been discussed in #1466065. Not sure it's worth revisiting that discussion.

Maybe just something like "invalid number of base64 characters"? We could even embed the actual number of base64 characters in the error message, which would give the user a clue that some characters are not being considered base64 characters.

I find the "1 more than a multiple of 4" wording a bit clunky, and potentially misleading.
History
Date User Action Args
2018-09-22 18:25:20mark.dickinsonsetrecipients: + mark.dickinson, taleinat, ned.deily
2018-09-22 18:25:20mark.dickinsonsetmessageid: <1537640720.94.0.956365154283.issue34736@psf.upfronthosting.co.za>
2018-09-22 18:25:20mark.dickinsonlinkissue34736 messages
2018-09-22 18:25:20mark.dickinsoncreate