MCPcopy Create free account
hub / github.com/ActiveState/code / write

Method write

recipes/Python/492210_dal2py/recipe-492210.py:40–44  ·  view source on GitHub ↗
(self, block, data)

Source from the content-addressed store, hash-verified

38
39 # Write A Block
40 def write(self, block, data):
41 assert type(block) is int and 0 <= block < self.__blocks
42 assert type(data) is str and len(data) == self.__disk.SIZE
43 assert self.__BIT[block] != 0
44 self.__disk.write(self.__index + block * self.__disk.SIZE, data)
45
46 # Close A Block
47 def close(self, block):

Callers 2

testFunction · 0.95
dumpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected