def run(args): results = list(pat.match(x) for pat, x in zip(patterns, args)) if all(x is not None for x in results): return dict(concat(results))
def match(self, value): if len(self.items) == len(self.items): results = list(pat.match(x) for pat, x in zip(self.items, value)) if all(x is not None for x in results): return list(concat(results))