exar...@twistedmatrix.com wrote:

I can't help thinking that most of this confusion is caused by using < for determining subsets. If < were not defined for sets and people had to use "set.issubset" (which exists already), then sorting a list with sets would raise an exception, a much more understandable failure mode than getting back a list in arbitrary order.

Personally I think it was premature to throw out __cmp__.

What should have happened instead is for __cmp__ to be
augmented with a fourth outcome, "not equal but unordered".
Then operations such as sorting that require a total ordering
could use __cmp__ and complain if they get an unordered
result.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to