MCPcopy 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
10def choice(*opts: str) -> str:
11 return "|".join("(%s)" % opt for opt in opts)
12
13
14# Regexes

Callers 11

randFunction · 0.85
mainFunction · 0.85
test_vsBuiltinSortMethod · 0.85
test_lruMethod · 0.85
test_large_sizeMethod · 0.85
struct_itemsFunction · 0.85
randitemsFunction · 0.85
test_choiceMethod · 0.85
test_push_randomMethod · 0.85
lexer.pyFile · 0.85

Calls 1

joinMethod · 0.45

Tested by 8

test_vsBuiltinSortMethod · 0.68
test_lruMethod · 0.68
test_large_sizeMethod · 0.68
struct_itemsFunction · 0.68
randitemsFunction · 0.68
test_choiceMethod · 0.68
test_push_randomMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…