Are dicts supposed to raise comparison errors

Serhiy Storchaka storchaka at gmail.com
Wed Aug 1 15:14:54 EDT 2018


01.08.18 21:03, Chris Angelico пише:
> And in any code that does not and cannot run on Python
> 2, the warning about bytes and text comparing unequal is nothing more
> than a false positive.

Not always. If your code supported Python 2 in the past, or third-party 
dependencies supports or supported Python 2, this warning can expose a 
real bug. Even if all your and third-party code always was Python 3 
only, the standard library can contain such kind of bugs.

Several years after the EOL of Python 2.7 and moving all living code to 
Python 3 we can ignore bytes warnings as always false positive.




More information about the Python-list mailing list