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

Method pop

recipes/Python/579071_OrderedSet/recipe-579071.py:44–49  ·  view source on GitHub ↗
(self, last=True)

Source from the content-addressed store, hash-verified

42 curr = curr[1]
43
44 def pop(self, last=True):
45 if not self:
46 raise KeyError('set is empty')
47 key = self.end[1][0] if last else self.end[2][0]
48 self.discard(key)
49 return key
50
51 def __repr__(self):
52 if not self:

Callers 15

reloadScheduleFunction · 0.45
mainFunction · 0.45
discardMethod · 0.45
ActionParsingFunction · 0.45
getMethod · 0.45
InfixFunction · 0.45
executeMethod · 0.45
InfixFunction · 0.45
BFSMethod · 0.45
strongconnectMethod · 0.45
computeFirstMethod · 0.45

Calls 1

discardMethod · 0.95

Tested by

no test coverage detected