Message73969
In byte warning mode (-b or -bb command line argument) b'' == '' raises
an exception but b'' != '' doesn't.
./python -bb
>>> b'' == ''
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
BytesWarning: Comparison between bytes and string
>>> b'' != ''
True
I can't recall why I implemented the byte warning mode this way. But
nowadays I think it could hide bugs in code like "while egg != ''" where
egg is a byte instance. |
|
Date |
User |
Action |
Args |
2008-09-28 11:32:57 | christian.heimes | set | recipients:
+ christian.heimes, barry |
2008-09-28 11:32:57 | christian.heimes | set | messageid: <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za> |
2008-09-28 11:32:55 | christian.heimes | link | issue3988 messages |
2008-09-28 11:32:55 | christian.heimes | create | |
|