A number smaller than negative infinity in python?
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? First of all Python 2 allowed comparing all types of mixed types. This wart was fixed in Python 3 eventually. CPython implementation detail : Objects of different types except numbers are ordered by their type names; objects of the same types that don’t support proper comparison are ordered by their address