This wouldn't work how users would expect it to work, so we're removing it.

This commit is contained in:
Jeremy Fincher 2004-07-15 18:21:15 +00:00
parent efca3783c1
commit c9867b28c3
1 changed files with 2 additions and 2 deletions

View File

@ -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]