# HG changeset patch # User Paul Fisher # Date 1569634703 14400 # Node ID d961c8a93d6b3ee248f1d8bacdbd251ac5d2bba8 # Parent 9310e2ff7e174fa380dc7c777b46cccefd14e284 reader: Use floor-division for list index. diff -r 9310e2ff7e17 -r d961c8a93d6b weatherlog/reader.py --- a/weatherlog/reader.py Fri Sep 27 21:37:23 2019 -0400 +++ b/weatherlog/reader.py Fri Sep 27 21:38:23 2019 -0400 @@ -108,7 +108,7 @@ if abs(v - bucket) <= epsilon: bucket_vals.append(v) if len(bucket_vals) == count: - return sorted(bucket_vals)[count / 2] + return sorted(bucket_vals)[count // 2] raise ValueError('No stable value.')