From 7c3850dd6c51c48c4dc3761e7be1599e3660dcea Mon Sep 17 00:00:00 2001 From: Rishabh Agarwal Date: Mon, 6 Apr 2020 12:23:18 -0400 Subject: [PATCH] Update bloom_filter.py Fix incorrect use of XOR operator to use correct POWER operator. In Python "2 ^ N" means "2 XOR N" whereas "2 ** N" means "2 to the power N". The fact that this change still passes all tests either indicates that there are serious test flaws. --- src/bloom_filter/bloom_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bloom_filter/bloom_filter.py b/src/bloom_filter/bloom_filter.py index e16c952..a2146a2 100644 --- a/src/bloom_filter/bloom_filter.py +++ b/src/bloom_filter/bloom_filter.py @@ -81,7 +81,7 @@ class Mmap_backend(object): Please note that this has only been tested on Linux so far: 2 -11-01. """ - effs = 2 ^ 8 - 1 + effs = 2 ** 8 - 1 def __init__(self, num_bits, filename): self.num_bits = num_bits