Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ discard
Method
discard
recipes/Python/579071_OrderedSet/recipe-579071.py:24–28 ·
view source on GitHub ↗
(self, key)
Source
from the content-addressed store, hash-verified
22
curr[2] = end[1] = self.map[key] = [key, curr, end]
23
24
def
discard(self, key):
25
if
key in self.map:
26
key, prev, next = self.map.pop(key)
27
prev[2] = next
28
next[1] = prev
29
30
def
__iter__(self):
31
end = self.end
Callers
1
pop
Method · 0.95
Calls
1
pop
Method · 0.45
Tested by
no test coverage detected