MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / pick

Method pick

07-1class-func/bingocall.py:26–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 random.shuffle(self._items) # <2>
25
26 def pick(self): # <3>
27 try:
28 return self._items.pop()
29 except IndexError:
30 raise LookupError('pick from empty BingoCage') # <4>
31
32 def __call__(self): # <5>
33 return self.pick()

Callers 1

__call__Method · 0.95

Calls 1

popMethod · 0.80

Tested by

no test coverage detected