> 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.
It's fixed in Python 3.x. Python 3.x refuses to compare objects unless one of both objects has explicit support for both types: >>> 1 < None Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: int() < NoneType() -- http://mail.python.org/mailman/listinfo/python-list