This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bulbjh
Recipients
Date 2007-03-13.20:33:15
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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)
History
Date User Action Args
2007-08-23 14:52:27adminlinkissue1680159 messages
2007-08-23 14:52:27admincreate