On Wednesday 15 August 2007 03:44:54 Bill Janssen wrote: > > (...) I think that base64MIME.encode() may have to accept strings. > > Personally, I think it would avoid more errors if it didn't.
Yeah, how can you guess which charset the user want to use? For most user, there is only one charset: latin-1. So I you use UTF-8, he will not understand conversion errors. Another argument: I like bidirectional codec: decode(encode(x)) == x encode(decode(x)) == x So if you mix bytes and str, these relations will be wrong. Victor Stinner aka haypo http://hachoir.org/ _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com