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

Method add

recipes/Python/579071_OrderedSet/recipe-579071.py:18–22  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

16 return key in self.map
17
18 def add(self, key):
19 if key not in self.map:
20 end = self.end
21 curr = end[1]
22 curr[2] = end[1] = self.map[key] = [key, curr, end]
23
24 def discard(self, key):
25 if key in self.map:

Callers 4

primMethod · 0.45
__init__Method · 0.45
flipOneEdgeMethod · 0.45
addPointMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected