def dist(a, b):
    return sum((i-j)**2 for i, j in zip(a, b))
def _compileddirpats(self):
        pat, matchfunc = _buildregexmatch(
            [("glob", p, "") for p in self._globdirpats], "$"
        )
        return matchfunc