Commits

Matt Chaput committed 4a118d2

Ensure BitSet.__contains__ returns a bool, for correctness and for pypy. Fixes issue #241.

  • Participants
  • Parent commits 6061731

Comments (0)

Files changed (1)

src/whoosh/support/bitvector.py

         bucket = i // 8
         if bucket >= len(self.bits):
             return False
-        return self.bits[bucket] & (1 << (i & 7))
+        return bool(self.bits[bucket] & (1 << (i & 7)))
 
     def add(self, i):
         bucket = i >> 3