On 2013-04-25, at 11:25 , Antoine Pitrou wrote:
> 
> Besides, I would consider a RFC more authoritative than a
> Wikipedia definition.

> Base encoding of data is used in many situations to store or transfer
> data in environments that, perhaps for legacy reasons, are restricted
> to US-ASCII [1] data.

so the output is US-ASCII data, a byte stream.

Stephen is correct that you could decide you don't care about those
semantics, and implement base64 encoding as a bytes -> str decoding then
requiring a re-encoding (to ascii) before wire transmission.

The clarity of the interface (or lack thereof) would probably make users
want to send a strongly worded letter to whoever implemented it though,
I don't think `data.decode('base64').encode('ascii')` would fit the 
"obviousness" or "readability" expectations of most users.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to