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 taleinat
Recipients mark.dickinson, ned.deily, taleinat
Date 2018-09-22.20:08:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537646894.67.0.956365154283.issue34736@psf.upfronthosting.co.za>
In-reply-to
Content
> I think what I _really_ want as a user is for b64decode to reject strings containing...

Do you mean you'd like to have this behavior by default?  One can already use validate=True to have invalid characters cause an exception.  I too find it surprising the False is the default, but changing this would be backwards incompatible.

> I find the "1 more than a multiple of 4" wording a bit clunky, and potentially misleading.

I chose that to avoid mentioning "modulu" or "remainder".  I find it straightforward and clear, though admittedly a bit long and clumsy.  I don't believe it is inherently misleading, though.

I like your idea of including the number of base64 characters in the error message.  I find the phrase "base64 characters" ambiguous, though.  I suggest: "Invalid base64-encoded string: number of data characters (13) cannot be 1 more than a multiple of 4"
History
Date User Action Args
2018-09-22 20:08:14taleinatsetrecipients: + taleinat, mark.dickinson, ned.deily
2018-09-22 20:08:14taleinatsetmessageid: <1537646894.67.0.956365154283.issue34736@psf.upfronthosting.co.za>
2018-09-22 20:08:14taleinatlinkissue34736 messages
2018-09-22 20:08:14taleinatcreate