[Python-Dev] base64 module (original) (raw)
Sanghyeon Seo sanxiyn at gmail.com
Thu Apr 6 07:45:17 CEST 2006
- Previous message: [Python-Dev] elementtree in stdlib
- Next message: [Python-Dev] base64 module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
base64 module documentation for b64decode function says, "TypeError is raised if s were incorrectly padded or if there are non-alphabet characters present in the string." But this doesn't seem to be the case. Testcase:
import base64 base64.b64decode('%')
Since % is a non-alphabet character, this should raise TypeError (btw, shouldn't this be ValueError instead?), but Python 2.4.3 silently ignores.
I found this while experimenting with IronPython. IronPython 1.0 Beta 5 gives:
Traceback (most recent call last): File base64, line unknown, in b64decode SystemError: cannot decode byte: '%'
It's not TypeError, but it doesn't silently ignore either.
Seo Sanghyeon
- Previous message: [Python-Dev] elementtree in stdlib
- Next message: [Python-Dev] base64 module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]