[issue9636] {'key': 'value'}[b'key'] raises a BytesWarning
Florent Xicluna
report at bugs.python.org
Thu Aug 19 12:26:47 CEST 2010
Florent Xicluna <florent.xicluna at gmail.com> added the comment:
Various annoyances:
>>> some_set = {'oOO', b'oOO'}
BytesWarning: Comparison between bytes and string
>>> 'a' in {b'', ''}
BytesWarning: Comparison between bytes and string
>>> 'abc' in (b'def', 123)
BytesWarning: Comparison between bytes and string
>>> 'abc' in {b'abc', 123}
BytesWarning: Comparison between bytes and string
>>> {42: 'abc'} == {42: b'def'}
BytesWarning: Comparison between bytes and string
----------
nosy: +flox
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9636>
_______________________________________
More information about the Python-bugs-list
mailing list