Message31513
Hello Folks,
unicode.__contains__ throws:
>>> '\xff' in u'foo'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'in <string>' requires string as left operand
while:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
would be more helpful, because that's what really fails there. The exception it throws now does not indicate that unicode is involved.
(tried this with 2.4.4 and 2.5.0 and happens in both) |
|
Date |
User |
Action |
Args |
2007-08-23 14:52:27 | admin | link | issue1680159 messages |
2007-08-23 14:52:27 | admin | create | |
|