def filter()

in mozdownload/parser.py [0:0]


    def filter(self, filter):
        """Filter entries by calling function or applying regex."""
        if hasattr(filter, '__call__'):
            return [entry for entry in self.entries if filter(entry)]
        else:
            pattern = re.compile(filter, re.IGNORECASE)
            return [entry for entry in self.entries if pattern.match(entry)]