[Python-Dev] Cleaning-up the new unittest API (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Tue Nov 2 23:33:39 CET 2010
- Previous message: [Python-Dev] Cleaning-up the new unittest API
- Next message: [Python-Dev] Cleaning-up the new unittest API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Cleaning-up the new unittest API
- Next message: [Python-Dev] Cleaning-up the new unittest API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]