MCPcopy
hub / github.com/AsahiLinux/m1n1 / replace

Method replace

proxyclient/m1n1/utils.py:599–606  ·  view source on GitHub ↗
(self, zone, val)

Source from the content-addressed store, hash-verified

597 yield range(self.__start[pos], self.__end[pos] + 1), self.__value[pos]
598
599 def replace(self, zone, val):
600 zone = self.__zone(zone)
601 if zone.start == zone.stop:
602 return
603 start, stop = self._overlap_range(zone, True)
604 self.__start = self.__start[:start] + [zone.start] + self.__start[stop:]
605 self.__end = self.__end[:start] + [zone.stop - 1] + self.__end[stop:]
606 self.__value = self.__value[:start] + [val] + self.__value[stop:]
607
608 def clear(self, zone=None):
609 if zone is None:

Callers 15

insert_nFunction · 0.80
parse_oneFunction · 0.80
get_dcp_deviceFunction · 0.80
compileMethod · 0.80
chexundumpFunction · 0.80
unhexFunction · 0.80
__setitem__Method · 0.80
setMethod · 0.80
__setitem__Method · 0.80
__setitem__Method · 0.80
sysreg.pyFile · 0.80
parse_verMethod · 0.80

Calls 2

__zoneMethod · 0.95
_overlap_rangeMethod · 0.95

Tested by

no test coverage detected