This is possible in python2:
None < float('-inf')
Also, it always returns
True
However, on python3, this throws
TypeError: unorderable types: NoneType() < int()
Why is None
comparable to integers/floats with python2? Are there any benefits or applications to None
being orderable in python2?