Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ choice
Function
choice
Tools/cases_generator/lexer.py:10–11 ·
view source on GitHub ↗
(*opts: str)
Source
from the content-addressed store, hash-verified
8
9
10
def
choice(*opts: str) -> str:
11
return
"|"
.join(
"(%s)"
% opt
for
opt in opts)
12
13
14
# Regexes
Callers
11
rand
Function · 0.85
main
Function · 0.85
test_vsBuiltinSort
Method · 0.85
test_lru
Method · 0.85
test_large_size
Method · 0.85
struct_items
Function · 0.85
randitems
Function · 0.85
test_choice
Method · 0.85
test_choice_with_numpy
Method · 0.85
test_push_random
Method · 0.85
lexer.py
File · 0.85
Calls
1
join
Method · 0.45
Tested by
8
test_vsBuiltinSort
Method · 0.68
test_lru
Method · 0.68
test_large_size
Method · 0.68
struct_items
Function · 0.68
randitems
Function · 0.68
test_choice
Method · 0.68
test_choice_with_numpy
Method · 0.68
test_push_random
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…