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/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com