encode() question

"Martin v. Löwis" martin at v.loewis.de
Tue Jul 31 16:31:46 EDT 2007


>>> str.decode and unicode.encode should NOT exist, or at least issue a  
>>> warning (IMHO).
>>>
>> Yes, that sounds like a good idea.
> 
> It sounds like horrible idea as those are the ones that are really needed.

Correct.

> One could argue about `str.encode` and `unicode.decode`.  But there are at
> least uses for `str.encode` like 'sting-escape', 'hex', 'bz2', 'base64'
> etc.

Indeed, in Py3k, those will be gone.

Regards,
Martin



More information about the Python-list mailing list