STINNER Victor <victor.stin...@haypocalc.com> added the comment: Oh. flox told me that there are other cases raising BytesWarning:
'abc' in {b'abc'} 'abc' in (b'xxx',) 'abc' in [b'xxx'] I suppose that the behaviour is different (only fail with same value / fail with different values) because set does first compare the hash (as dict), whereas tuple and list use a classic comparaison. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9636> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com