base64.decodestring gives binascii.error
Alex Martelli
aleax at aleax.it
Fri Dec 28 11:42:47 EST 2001
More information about the Python-list mailing list
Fri Dec 28 11:42:47 EST 2001
- Previous message (by thread): REPOST: Re: Can't exit python with ^D under certain circumstances
- Next message (by thread): base64.decodestring gives binascii.error
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Erik Myllymaki" <erik at pacific-shores.com> wrote in message news:3C2C9D79.9050501 at pacific-shores.com... > The '_' and '!' were in the original string that was then encoded, not > in the resulting encoded string. Then, it's clearly a bug in the base64 module you're using. I don't see it here: >>> x=base64.encodestring('oh_my!') >>> x 'b2hfbXkh\n' >>> base64.decodestring(x) 'oh_my!' >>> [original context was -- oh those hateful add-in-front habits!: > >>should base64.decodestring give a binascii.error if it encounters > >>special chars like '_' and '!' ? > > > > Makes sense to me; after all, such characters should never be > > in a string produced by base64, so the data must have been > > damaged in transit -- raising an exceptions seems appropriate. ] Alex
- Previous message (by thread): REPOST: Re: Can't exit python with ^D under certain circumstances
- Next message (by thread): base64.decodestring gives binascii.error
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list