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

Function treatword

Tools/freeze/checkextensions.py:60–70  ·  view source on GitHub ↗
(w)

Source from the content-addressed store, hash-verified

58cc_exts = ['.c', '.C', '.cc', '.c++']
59
60def treatword(w):
61 if w[:2] in cc_flags:
62 return None
63 if w[:1] == '-':
64 return w # Assume loader flag
65 head, tail = os.path.split(w)
66 base, ext = os.path.splitext(tail)
67 if ext in cc_exts:
68 tail = base + '.o'
69 w = os.path.join(head, tail)
70 return w
71
72def expandvars(str, vars):
73 i = 0

Callers 1

selectFunction · 0.85

Calls 3

splitextMethod · 0.80
splitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…