def match(self, actual): if self.comparator(actual, self.expected): return None return _MappingLikeMismatch( self.fields, self.get_field, actual, self.mismatch_string, self.expected, )