R. David Murray <rdmur...@bitdance.com> added the comment: Actually, I've already fixed this for 2.7 (issue 1680159) by letting the UnicodeDecodeError propagate upward. I don't think making 'f' in u'foo' an error would be a good idea.
Unless I'm mistaken the py3 behavior is correct. If someone has a case where the py3 message or behavior is incorrect they can reopen (or open a new issue, since the cause is likely to be different if there is a problem). (Actually, the message you get when you do 'o' in b'foo' is...not obvious; but as I said I think that's a different issue from this one.) ---------- nosy: +r.david.murray resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Misleading exception from unicode.__contains__ versions: -Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4328> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com