def _compile_wildcard(self, pattern, pathname=False):
        """Compile or format the wildcard inclusion/exclusion pattern."""

        patterns = None
        flags = self.flags
        if pathname:
            flags |= _wcparse.PATHNAME
        if pattern:
            patterns = _wcparse.WcSplit(pattern, flags=flags).split()

        return _wcparse.compile(patterns, flags) if patterns else patterns