A few more Python2 -> Python3 changes
This commit is contained in:
parent
627d7197f7
commit
d388791009
|
@ -150,7 +150,7 @@ class WordHasher(object):
|
|||
bytes = [integer & 0b11111111]
|
||||
for n in range(1,6):
|
||||
div = 2**(n*8)
|
||||
bytes.append((integer/div) & 0b11111111)
|
||||
bytes.append((integer//div) & 0b11111111)
|
||||
|
||||
bytes.reverse()
|
||||
return bytes
|
||||
|
@ -182,8 +182,8 @@ class WordHasher(object):
|
|||
A rugbit is like a byte but with 15bits instead of eight.
|
||||
"""
|
||||
fifteen_bits = 0b111111111111111
|
||||
rugbits = [(integer >> 30) & fifteen_bits,
|
||||
(integer >> 15) & fifteen_bits,
|
||||
rugbits = [(integer//(2**30)) & fifteen_bits,
|
||||
(integer//(2**15)) & fifteen_bits,
|
||||
integer & fifteen_bits]
|
||||
return rugbits
|
||||
|
||||
|
|
Loading…
Reference in New Issue