4 ms·
Python has built-in facilities for that, there is no need to write wrapper by yourself. from functools import partial with open('mydata.db', 'rb') as f:
by bvrmn 7y ago
Python has built-in facilities for that, there is no need to write wrapper by yourself.
from functools import partial
with open('mydata.db', 'rb') as f:
for block in iter(partial(f.read, 64), b''):
process_block(block)