Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
_ref
Function · 0.85
partial
Function · 0.85
Tested by
no test coverage detected