فهرست منبع

Made compatible with 3.x again

dstromberg 13 سال پیش
والد
کامیت
9a6eae213e
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      bloom_filter_mod.py

+ 2 - 2
bloom_filter_mod.py

@@ -30,8 +30,8 @@ def get_index_bitmask_seed_rnd(bloom_filter, key):
 		yield array_index, 1 << bit_within_word_index
 
 
-MERSENNES1 = [ 2**x - 1 for x in 17, 31, 127 ]
-MERSENNES2 = [ 2**x - 1 for x in 19, 67, 257 ]
+MERSENNES1 = [ 2**x - 1 for x in [ 17, 31, 127 ] ]
+MERSENNES2 = [ 2**x - 1 for x in [ 19, 67, 257 ] ]
 
 def simple_hash(int_list, prime1, prime2, prime3):
 	'''Compute a hash value from a list of integers and 3 primes'''