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

Function find_repl_patterns

numpy/f2py/_src_pyf.py:85–93  ·  view source on GitHub ↗
(astr)

Source from the content-addressed store, hash-verified

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

Callers 3

expand_subFunction · 0.70
_src_pyf.pyFile · 0.70

Calls 4

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

Tested by

no test coverage detected