(cls, pattern, ignorecase=True)
| 821 | |
| 822 | @classmethod |
| 823 | def make_re(cls, pattern, ignorecase=True): |
| 824 | assert isinstance(pattern, str), "bad pattern: {!r}".format(pattern) |
| 825 | assert isinstance(ignorecase, bool) |
| 826 | flags = 0 |
| 827 | if ignorecase: |
| 828 | flags |= re.IGNORECASE |
| 829 | return re.compile(fnmatch.translate(pattern), flags=flags) |
| 830 | |
| 831 | def __iter__(self): |
| 832 | for i in self._iter: |