Martin v. Löwis wrote:
> 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.

As a vote for keeping it, does anyone really want to encode the 
base64-ed data as something other than "ascii"?

I mean, does it make any sense to write:
tosend = base64.encodestring(data.encode("utf-8")).encode("UTF-16")
?  Even if you could, I believe the resulting string would be 
un-processable by any other base-64 decoding tool.

Later,
Blake.
_______________________________________________
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