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

Method write

recipes/Python/492209_dal1py/recipe-492209.py:179–183  ·  view source on GitHub ↗
(self, index, data)

Source from the content-addressed store, hash-verified

177
178 # Write Some Data
179 def write(self, index, data):
180 assert type(index) is int and 0 <= index < len(self)
181 assert type(data) is str and index < index + len(data) <= len(self)
182 self.__string = self.__string[:index] + data + \
183 self.__string[index+len(data):]
184
185 # Erase Some Data
186 def erase(self, index, size):

Callers 2

eraseMethod · 0.95
testFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected