Skip to content

Commit a432c54

Browse files
committed
Update list.py
1 parent f411862 commit a432c54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

py/tests/list.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
s5 = [0]
7171
s5.sort()
7272
assert s5 == [0]
73+
s5 = [0, 1]
74+
# Sorting a list of len >= 2 with uncallable key must fail on all Python implementations.
7375
assertRaises(TypeError, lambda: s5.sort(key=1))
7476

7577
doc="finished"

0 commit comments

Comments
 (0)