summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_heapq.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-08-02 19:16:44 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-08-02 19:16:44 (GMT)
commitd9ea39db84a78b3b994943bc7490615dfe6b009d (patch)
tree0d9e6c97bdde8debfd1dab876df423b594e0335c /Lib/test/test_heapq.py
parentb48128650455cd163908cd756a651ad37d550eee (diff)
downloadcpython-d9ea39db84a78b3b994943bc7490615dfe6b009d.zip
cpython-d9ea39db84a78b3b994943bc7490615dfe6b009d.tar.gz
cpython-d9ea39db84a78b3b994943bc7490615dfe6b009d.tar.bz2
Don't use true division where int division was intended. For that matter,
don't use division at all.
Diffstat (limited to 'Lib/test/test_heapq.py')
-rw-r--r--Lib/test/test_heapq.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
index 43723f3..016fd3a 100644
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -8,7 +8,7 @@ import random
def check_invariant(heap):
# Check the heap invariant.
for pos, item in enumerate(heap):
- parentpos = (pos+1)/2 - 1
+ parentpos = ((pos+1) >> 1) - 1
if parentpos >= 0:
verify(heap[parentpos] <= item)