3 ms·
Agreed. In Python 2, you had float('-inf') < "" So you could sort of get away with that. But that positive infinity wasn't bigger than any string. And in
by eru 7y ago
Agreed.
In Python 2, you had
float('-inf') < ""
So you could sort of get away with that. But that positive infinity wasn't bigger than any string. And in Python 3 comparing strings and numbers just results in an error.