mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
This wouldn't work how users would expect it to work, so we're removing it.
This commit is contained in:
parent
efca3783c1
commit
c9867b28c3
@ -388,11 +388,11 @@ def be(i):
|
||||
else:
|
||||
return 'are'
|
||||
|
||||
def sortBy(f, L, cmp=cmp):
|
||||
def sortBy(f, L):
|
||||
"""Uses the decorate-sort-undecorate pattern to sort L by function f."""
|
||||
for (i, elt) in enumerate(L):
|
||||
L[i] = (f(elt), i, elt)
|
||||
L.sort(cmp)
|
||||
L.sort()
|
||||
for (i, elt) in enumerate(L):
|
||||
L[i] = L[i][2]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user