[Python-ideas] Strings can sometimes convert to bytes without an encoding

Terry Reedy tjreedy at udel.edu
Wed Jun 15 00:06:35 EDT 2016


On 6/14/2016 10:09 PM, Serhiy Storchaka wrote:
> On 15.06.16 03:34, Terry Reedy wrote:
>> A null case is the only case where an encoding is not needed, but having
>> a special rule is not worth the trouble.
>
> It is needed even in null case. bytes('', 'utf-8') != bytes('', 'utf-16').

& bytes('', 'utf-32') is different yet ;-).

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list