def on_mismatch(function):
 def decorated(matcher):
  def make_matcher(*args, **kwargs):
   return _OnMismatch(function, matcher(*args, **kwargs))
  return make_matcher
 return decorated

def on_mismatch ( function ) : def decorated ( matcher ) : def make_matcher ( * args , ** kwargs ) : return _OnMismatch ( function , matcher ( * args , ** kwargs ) ) return make_matcher return decorated
return a function that maps matcher factories to new matcher factories .