mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +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:
|
else:
|
||||||
return 'are'
|
return 'are'
|
||||||
|
|
||||||
def sortBy(f, L, cmp=cmp):
|
def sortBy(f, L):
|
||||||
"""Uses the decorate-sort-undecorate pattern to sort L by function f."""
|
"""Uses the decorate-sort-undecorate pattern to sort L by function f."""
|
||||||
for (i, elt) in enumerate(L):
|
for (i, elt) in enumerate(L):
|
||||||
L[i] = (f(elt), i, elt)
|
L[i] = (f(elt), i, elt)
|
||||||
L.sort(cmp)
|
L.sort()
|
||||||
for (i, elt) in enumerate(L):
|
for (i, elt) in enumerate(L):
|
||||||
L[i] = L[i][2]
|
L[i] = L[i][2]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user