Stefan Behnel, 15.01.2011 17:48:
> Stefan Behnel, 15.01.2011 17:29:
>> Vitja Makarov, 15.01.2011 17:21:
>>> Please notice that '\u' is valid string but not unicode string,
>>> so it's valid in py2 and not py3.
>>
>> Nope, it's valid in byte strings but not in unicode strings. Py2/Py3 is not
>> an issue here.
>
> Hmm, actually, you are right. Py2/Py3 *is* an issue here, because
> unprefixed strings in Py2 code become unicode strings in Py3. So, if we
> find an invalid unicode escape sequence, the string must become a plain
> byte string, and the parsed unicode string must be dropped.
>
> I think a Py3 incompatibility warning would be good in that case.

Actually, no, I think an error is perfectly ok. If a byte string is wanted, 
use a byte string in the first place.

Stefan
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to