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

Method set

recipes/Python/577580_weak_reference_map/recipe-577580.py:86–90  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

84 self.__map = {}
85
86 def set(self, key, value):
87 ikey = id(key)
88 self.__map[ikey] = (value,
89 _ref(key, partial(self.forget_key, ikey))
90 )
91
92 def get(self, key, **kwargs):
93 ikey = id(key)

Callers

nothing calls this directly

Calls 2

_refFunction · 0.85
partialFunction · 0.85

Tested by

no test coverage detected