mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #1771: Remove cmp parameter from list.sort() and builtin.sorted().
This commit is contained in:
parent
4f066126d6
commit
70b64fce96
10 changed files with 82 additions and 265 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue