(pat)
| 37 | |
| 38 | @functools.lru_cache(maxsize=32768, typed=True) |
| 39 | def _compile_pattern(pat): |
| 40 | if isinstance(pat, bytes): |
| 41 | pat_str = str(pat, 'ISO-8859-1') |
| 42 | res_str = translate(pat_str) |
| 43 | res = bytes(res_str, 'ISO-8859-1') |
| 44 | else: |
| 45 | res = translate(pat) |
| 46 | return re.compile(res).match |
| 47 | |
| 48 | def filter(names, pat): |
| 49 | """Construct a list from those elements of the iterable NAMES that match PAT.""" |
no test coverage detected