MCPcopy Index your code
hub / github.com/python/cpython / _compile_pattern

Function _compile_pattern

Lib/glob.py:335–340  ·  view source on GitHub ↗

Compile given glob pattern to a re.Pattern object (observing case sensitivity).

(pat, seps, case_sensitive, recursive=True)

Source from the content-addressed store, hash-verified

333
334@functools.lru_cache(maxsize=512)
335def _compile_pattern(pat, seps, case_sensitive, recursive=True):
336 """Compile given glob pattern to a re.Pattern object (observing case
337 sensitivity)."""
338 flags = re.NOFLAG if case_sensitive else re.IGNORECASE
339 regex = translate(pat, recursive=recursive, include_hidden=True, seps=seps)
340 return re.compile(regex, flags=flags).match
341
342
343class _GlobberBase:

Callers 1

compileMethod · 0.70

Calls 2

translateFunction · 0.70
compileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…