> I believe that converting a Unicode string to a base64 encoded form is 
> necessarily a 2-step process.

I think that part is undebated. What is the debate is whether
base64.encodestring (which accepts bytes) should *produce*
(unicode) strings, which would then have to be encoded as
us-ascii. That would make a process of going from unicode
to base64 bytes a three-step process:

   tosend = base64.encodestring(data.encode("utf-8")).encode("ascii")

Currently, you can spare the last step if you do want bytes,
and need to specify .decode("ascii") if you want strings.

Regards,
Martin
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to