mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
I believe the intention here was to avoid a global lookup
This commit is contained in:
parent
4829136965
commit
fb921e2c00
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ def nlargest(n, iterable):
|
||||||
heapify(result)
|
heapify(result)
|
||||||
_heappushpop = heappushpop
|
_heappushpop = heappushpop
|
||||||
for elem in it:
|
for elem in it:
|
||||||
heappushpop(result, elem)
|
_heappushpop(result, elem)
|
||||||
result.sort(reverse=True)
|
result.sort(reverse=True)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue