[Python-Dev] unicode inconsistency?
"Martin v. Löwis"
martin at v.loewis.de
Thu Sep 9 23:00:12 CEST 2004
M.-A. Lemburg wrote:
>> No, it would not "work" the way I want. I don't want to force
>> things to unicode strings unless necessary.
>
>
> Unicode always causes coercion towards Unicode, just like floats
> always cause coercion towards floats. Nothing's going to
> change at that end.
Not always. As we are discussing right now, str() (and indirectly
%s) coerce Unicode objects into string objects. Also,
PyArg_ParseTuple coerces Unicode into byte strings for the "s"
and "t" formats.
Regards,
Martin
More information about the Python-Dev
mailing list