Why is None <= 0
p at ulmcnett.com
Fri Apr 25 20:54:23 CEST 2008
Gregor Horvath wrote:
> >>> None <= 0
>>> None < 0
> Is there a logical reason?
None is "less than" everything except for itself:
>>> None < 'a'
>>> None < False
>>> None == None
In my humble opinion, I think that comparisons involving None should
return None, but I trust that the designers came up with this for very
good reasons. As far as I know I've never been bitten by it.
More information about the Python-list