I believe the intention here was to avoid a global lookup

This commit is contained in:
Benjamin Peterson 2009-01-31 21:00:10 +00:00
parent 4829136965
commit fb921e2c00
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ def nlargest(n, iterable):
heapify(result)
_heappushpop = heappushpop
for elem in it:
heappushpop(result, elem)
_heappushpop(result, elem)
result.sort(reverse=True)
return result