[Python-ideas] Adding 'bytes' as alias for 'latin_1' codec.

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 31 02:38:07 CEST 2011


Stephen J. Turnbull wrote:
> Greg Ewing writes:
> 
>  > How would ascii behave when mixed with unicode strings? Should it
>  > automatically coerce to unicode,
> 
> Definitely not!  Bytes are not text, and the programmer must say when
> they want those bytes decoded.

But the proposed 'ascii' type *is* text, though. Whether it's
a good idea to auto-coerce I'm not sure, but it's not obviously
wrong to do so.

-- 
Greg



More information about the Python-ideas mailing list