Very strange unicode behaviour

Syver Enstad syver at inout.no
Fri Jan 16 11:39:32 EST 2004


I have seem to isolate the behaviour:

>>> chr(127).find(u'')
0
>>>
>>> chr(128).find(u'')
-1
>>>
UnicodeError: ASCII decoding error: ordinal not in range(128)
>>>

Observe that the exception is first thrown on after execing a blank
line, after calling find on a non ASCII string.

I'll test this on 2.3 when I get home from work.




More information about the Python-list mailing list