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

Method pick

13-protocol-abc/typing/randompick_test.py:11–12  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9 random.shuffle(self._items)
10
11 def pick(self) -> Any: # <3>
12 return self._items.pop()
13
14def test_isinstance() -> None: # <4>
15 popper: RandomPicker = SimplePicker([1]) # <5>

Callers 1

test_item_typeFunction · 0.95

Calls 1

popMethod · 0.80

Tested by

no test coverage detected