Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
14
def
test_isinstance() -> None:
# <4>
15
popper: RandomPicker = SimplePicker([1])
# <5>
Callers
1
test_item_type
Function · 0.95
Calls
1
pop
Method · 0.80
Tested by
no test coverage detected