A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-November/105183.html below:

[Python-Dev] Cleaning-up the new unittest API

[Python-Dev] Cleaning-up the new unittest API [Python-Dev] Cleaning-up the new unittest APIGreg Ewing greg.ewing at canterbury.ac.nz
Tue Nov 2 23:33:39 CET 2010
exarkun at 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4