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 Red HamsterX
Recipients Red HamsterX, ajaksu2, amaury.forgeotdarc, sanxiyn
Date 2009-07-29.16:31:00
SpamBayes Score 7.3949236e-10
Marked as misclassified No
Message-id <1248885062.35.0.736284445272.issue1466065@psf.upfronthosting.co.za>
In-reply-to
Content
I can't add a test for that without changing unrelated behaviour in the
library that is already known to work fine or checking the string value
of the raised exception, which seems like a bad idea, even though it
would work.

If a character is ignored and this leads to a padding-length issue,
TypeError is raised in both 2.7 and 3.2: 2.7 because everything is a
TypeError, and 3.2 because binascii.Error is converted to TypeError for
legacy purposes.

If a character is ignored and the string's length is still acceptable,
then no error is reported because this was a silent problem.

Post-library-modification, both of these cases will uniformly produce
the proper error, although it is, through type-checking alone,
indistinguishable from the errors that would have existed before -- the
value is in the fact that it will tell the user the nature of the
failure, and it will be noisy when it may have been silent before.
History
Date User Action Args
2009-07-29 16:31:02Red HamsterXsetrecipients: + Red HamsterX, amaury.forgeotdarc, sanxiyn, ajaksu2
2009-07-29 16:31:02Red HamsterXsetmessageid: <1248885062.35.0.736284445272.issue1466065@psf.upfronthosting.co.za>
2009-07-29 16:31:00Red HamsterXlinkissue1466065 messages
2009-07-29 16:31:00Red HamsterXcreate