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

Method pop

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

Source from the content-addressed store, hash-verified

49 raise KeyError(str(key))
50
51 def pop(self, key):
52 ikey = id(key)
53 if ikey in self.__map:
54 value = self.__valmemo[self.__map[ikey][0]]()
55 self.forget_key(ikey)
56 return value
57 else:
58 raise KeyError(str(key))
59
60 def forget_key(self, keyid, obj=None):
61 if keyid in self.__map:

Callers 9

getargMethod · 0.45
wrapperFunction · 0.45
OnKeyUpMethod · 0.45
endElementMethod · 0.45
forget_keyMethod · 0.45
forget_valueMethod · 0.45
popMethod · 0.45
forget_keyMethod · 0.45
getargMethod · 0.45

Calls 2

forget_keyMethod · 0.95
strFunction · 0.85

Tested by

no test coverage detected