M.-A. Lemburg wrote:
Why was the special case for None being "smaller" than all other
objects in Python removed from Python 3.0 ? (see object.c in Py2.x)
For one thing, it is only smallest when it controls the comparison.
>>> class c(object):
... def __lt__(s,o): return True
...
>>> cc = c()
>>> cc < None
True
Of course,
>>> None < cc
True
Which means that both [cc, None] and [None, cc] are sorted (assuming it
only uses < comparison).
Terry Jan Reedy
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com