Open pylint-bot opened 8 years ago
Originally reported by: BitBucket: bossylobster
When doing a set comparison
"""Small set example.""" LEFT_VALS = 'bad' RIGHT_VALS = 'akbar' if not set(LEFT_VALS) <= set(RIGHT_VALS): print 'Left vals are not contained'
and the error (not present in 1.4.4, but appeared in 1.5.0) is suggesting something which is not mathematically equivalent:
************* Module set_example C: 6, 3: Consider changing "not set(LEFT_VALS) <= set(RIGHT_VALS)" to "set(LEFT_VALS) > set(RIGHT_VALS)" (unneeded-not)
The issue is that the integers (or reals) are totally ordered but sets are not totally ordered.
set
Originally reported by: BitBucket: bossylobster
When doing a set comparison
and the error (not present in 1.4.4, but appeared in 1.5.0) is suggesting something which is not mathematically equivalent:
The issue is that the integers (or reals) are totally ordered but
set
s are not totally ordered.