Issue #1771: Remove cmp parameter from list.sort() and builtin.sorted().

This commit is contained in:
Raymond Hettinger 2008-01-30 20:15:17 +00:00
parent 4f066126d6
commit 70b64fce96
10 changed files with 82 additions and 265 deletions

View file

@ -1764,9 +1764,6 @@ class TestSorted(unittest.TestCase):
data.reverse()
random.shuffle(copy)
self.assertEqual(data, sorted(copy, cmp=lambda x, y: (x < y) - (x > y)))
self.assertNotEqual(data, copy)
random.shuffle(copy)
self.assertEqual(data, sorted(copy, key=lambda x: -x))
self.assertNotEqual(data, copy)
random.shuffle(copy)