PEP8 validations

print statments compatible for python3
This commit is contained in:
omkar1117 2019-07-27 07:55:29 +05:30
parent 0eb4f46923
commit 7960dd315e

View File

@ -1,10 +1,13 @@
""" """
dev/bloomfiltertest.py dev/bloomfiltertest.py
====================== ======================
""" """
import sqlite3 import sqlite3
from os import getenv, path from os import getenv, path
from time import time from time import time
@ -52,15 +55,12 @@ for row in cur.fetchall():
# f.close() # f.close()
print "Item count: %i" % (itemcount) print("Item count: %i" % itemcount)
print "Raw length: %i" % (rawlen) print("Raw length: %i" % rawlen)
print "Bloom filter 1 length: %i, reduction to: %.2f%%" % \ print("Bloom filter 1 length: %i, reduction to: %.2f%%" % (
(bf1.bitarray.buffer_info()[1], bf1.bitarray.buffer_info()[1], 100.0 * bf1.bitarray.buffer_info()[1] / rawlen))
100.0 * bf1.bitarray.buffer_info()[1] / rawlen) print("Bloom filter 1 capacity: %i and error rate: %.3f%%" % bf1.capacity, 100.0 * bf1.error_rate)
print "Bloom filter 1 capacity: %i and error rate: %.3f%%" % (bf1.capacity, 100.0 * bf1.error_rate) print("Bloom filter 1 took %.2fs" % bf1time)
print "Bloom filter 1 took %.2fs" % (bf1time) print("Bloom filter 2 length: %i, reduction to: %.3f%%" % bf2.num_bits / 8, 100.0 * bf2.num_bits / 8 / rawlen)
print "Bloom filter 2 length: %i, reduction to: %.3f%%" % \ print("Bloom filter 2 capacity: %i and error rate: %.3f%%" % bf2.capacity, 100.0 * bf2.error_rate)
(bf2.num_bits / 8, print("Bloom filter 2 took %.2fs" % bf2time)
100.0 * bf2.num_bits / 8 / rawlen)
print "Bloom filter 2 capacity: %i and error rate: %.3f%%" % (bf2.capacity, 100.0 * bf2.error_rate)
print "Bloom filter 2 took %.2fs" % (bf2time)