Message285940
BytesWarning can be raised during compilation.
$ ./python -Wa -b -c "lambda: 'a'; lambda: b'a'"
sys:1: BytesWarning: Comparison between bytes and string
sys:1: BytesWarning: Comparison between bytes and string
sys:1: BytesWarning: Comparison between bytes and string
sys:1: BytesWarning: Comparison between bytes and string
_PyCode_ConstantKey() should produce keys that don't allow comparing bytes with strings nested in tuples or frozensets. Currently it returns (tuple, ('a',), ((str, 'a'),)) for ('a',) and (tuple, (b'a',), ((bytes, b'a'),)) for (b'a',). Key tuples have the same size and the same first element. Comparing second elements emits a BytesWarning. |
|
Date |
User |
Action |
Args |
2017-01-21 07:09:46 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, methane |
2017-01-21 07:09:46 | serhiy.storchaka | set | messageid: <1484982586.78.0.422468246503.issue29337@psf.upfronthosting.co.za> |
2017-01-21 07:09:46 | serhiy.storchaka | link | issue29337 messages |
2017-01-21 07:09:46 | serhiy.storchaka | create | |
|