Message326111
> 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" |
|
Date |
User |
Action |
Args |
2018-09-22 20:08:14 | taleinat | set | recipients:
+ taleinat, mark.dickinson, ned.deily |
2018-09-22 20:08:14 | taleinat | set | messageid: <1537646894.67.0.956365154283.issue34736@psf.upfronthosting.co.za> |
2018-09-22 20:08:14 | taleinat | link | issue34736 messages |
2018-09-22 20:08:14 | taleinat | create | |
|