Skip to content
Snippets Groups Projects
Commit 4fd39a5a authored by Pierre LALET's avatar Pierre LALET
Browse files

Python 3: use floor division

parent e0993c91
No related branches found
No related tags found
No related merge requests found
......@@ -656,7 +656,7 @@ def corrupt_bits(s, p=0.01, n=None):
if n is None:
n = max(1,int(l*p))
for i in random.sample(range(l), n):
s[i/8] ^= 1 << (i%8)
s[i // 8] ^= 1 << (i % 8)
return s.tostring()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment