[Python-Dev] email package status in 3.X

Terry Reedy tjreedy at udel.edu
Tue Jun 22 22:32:40 CEST 2010


On 6/22/2010 9:24 AM, Michael Urman wrote:

> By idempotent-when-possible, I mean to_bytes(str_or_bytes, encoding,
> errors) that would pass an instance of bytes through, or encode an
> instance of str. And of course a to_str that performs similarly,
> passing str through and decoding bytes. While bytes(b'abc') will give
> me b'abc', neither bytes('abc') nor bytes(b'abc', 'latin-1') get me
> the b'abc' I want to see.
>
> These are trivial functions;
> I just don't fully understand why the capability isn't baked in.

Possible reasons: They are special purpose functions easily built on the 
basic functions provided. Fine for a 3rd party library. Most people do 
not need them. Some might be mislead by them. As other have said, "Not 
every one-liner should be builtin".

-- 
Terry Jan Reedy



More information about the Python-Dev mailing list