MCPcopy Create free account
hub / github.com/numpy/numpy / find_repl_patterns

Function find_repl_patterns

numpy/distutils/from_template.py:89–97  ·  view source on GitHub ↗
(astr)

Source from the content-addressed store, hash-verified

87list_re = re.compile(r"<\s*((.*?))\s*>")
88
89def find_repl_patterns(astr):
90 reps = named_re.findall(astr)
91 names = {}
92 for rep in reps:
93 name = rep[0].strip() or unique_key(names)
94 repl = rep[1].replace(r'\,', '@comma@')
95 thelist = conv(repl)
96 names[name] = thelist
97 return names
98
99def find_and_remove_repl_patterns(astr):
100 names = find_repl_patterns(astr)

Callers 3

expand_subFunction · 0.70
from_template.pyFile · 0.70

Calls 4

stripMethod · 0.80
replaceMethod · 0.80
unique_keyFunction · 0.70
convFunction · 0.70

Tested by

no test coverage detected