> 2007/10/26, Bill Janssen <[EMAIL PROTECTED]>: > > I think encodestring() should return a string, not bytes, and > > decodestring() should take either a string, or bytes containing an > > ASCII-encoded string. Otherwise, every place they'll ever be > > used has to wrap an additional unicode/encode step around their > > use. > > I'm okay with being flexible on input. I think there ought to be > separate functions returning bytes and str.
I'm fine with that, too. I just think that the purpose of standard_b64encode() is to take bytes and produce text, and the purpose of standard_b64decode() is to take text and produce bytes. But if we want to add encodestring_to_ascii(), to take bytes and produce ASCII base64-encoded bytes, and decodestring_from_ascii(), to take an ASCII-encoded string as bytes, and produce bytes, that's OK with me. But it seems odd. Bill _______________________________________________ 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