MCPcopy Index your code
hub / github.com/clips/pattern / __setitem__

Method __setitem__

pattern/web/cache/__init__.py:95–99  ·  view source on GitHub ↗
(self, k, v)

Source from the content-addressed store, hash-verified

93 return self.get(k)
94
95 def __setitem__(self, k, v):
96 f = open(self._hash(k), "wb")
97 f.write(codecs.BOM_UTF8)
98 f.write(encode_utf8(v))
99 f.close()
100
101 def __delitem__(self, k):
102 try: os.unlink(self._hash(k))

Callers

nothing calls this directly

Calls 4

_hashMethod · 0.95
encode_utf8Function · 0.85
writeMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected