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

Method pop

recipes/Python/577624_OrderedSet/recipe-577624.py:46–51  ·  view source on GitHub ↗
(self, last=True)

Source from the content-addressed store, hash-verified

44 curr = curr[self.PREV]
45
46 def pop(self, last=True):
47 if not self:
48 raise KeyError('set is empty')
49 key = next(reversed(self)) if last else next(iter(self))
50 self.discard(key)
51 return key
52
53 def __repr__(self):
54 if not self:

Callers 15

autodrawMethod · 0.45
emulate_kwonlyFunction · 0.45
NamedSequencesFunction · 0.45
recipe-577281.pyFile · 0.45
endElementMethod · 0.45
socketMethod · 0.45
fireMethod · 0.45
flattenFunction · 0.45
xflattenFunction · 0.45
flatten_itFunction · 0.45
xflatten_itFunction · 0.45
nextMethod · 0.45

Calls 2

discardMethod · 0.95
reversedFunction · 0.50

Tested by

no test coverage detected