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

Method discard

recipes/Python/577624_OrderedSet/recipe-577624.py:26–30  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

24 curr[self.NEXT] = end[self.PREV] = self.map[key] = [key, curr, end]
25
26 def discard(self, key):
27 if key in self.map:
28 key, prev, next = self.map.pop(key)
29 prev[self.NEXT] = next
30 next[self.PREV] = prev
31
32 def __iter__(self):
33 end = self.end

Callers 5

popMethod · 0.95
toposort2Function · 0.45
removeAsyncSocketMethod · 0.45

Calls 1

popMethod · 0.45

Tested by

no test coverage detected