MCPcopy Create free account
hub / github.com/python/cpython / find_opt

Function find_opt

Tools/freeze/test/freeze.py:58–64  ·  view source on GitHub ↗
(args, name)

Source from the content-addressed store, hash-verified

56
57
58def find_opt(args, name):
59 opt = f'--{name}'
60 optstart = f'{opt}='
61 for i, arg in enumerate(args):
62 if arg == opt or arg.startswith(optstart):
63 return i
64 return -1
65
66
67def ensure_opt(args, name, value):

Callers 1

ensure_optFunction · 0.85

Calls 2

enumerateFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…