def dict_diff(left, right):
 dummy = object()
 return dict(filter((lambda (k, v): (left.get(k, dummy) != v)), right.iteritems()))

def dict_diff ( left , right ) : dummy = object ( ) return dict ( filter ( ( lambda ( k , v ) : ( left . get ( k , dummy ) != v ) ) , right . iteritems ( ) ) )
computes a dictionary with the elements that are in the right but not or different in the left .