summaryrefslogtreecommitdiff
path: root/Lib/heapq.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/heapq.py')
-rw-r--r--Lib/heapq.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/heapq.py b/Lib/heapq.py
index cdba693b6d..6264700ee4 100644
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -126,7 +126,7 @@ def heappush(heap, item):
pos = len(heap)
heap.append(None)
while pos:
- parentpos = (pos - 1) / 2
+ parentpos = (pos - 1) >> 1
parent = heap[parentpos]
if item >= parent:
break