Mercurial > personal > weatherlog
changeset 3:d961c8a93d6b
reader: Use floor-division for list index.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Fri, 27 Sep 2019 21:38:23 -0400 |
parents | 9310e2ff7e17 |
children | 1abd0cc4caa4 |
files | weatherlog/reader.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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.')