def safe_update(dict_to, dict_from):
 for (key, val) in dict(dict_from).iteritems():
  if (key in dict_to):
   raise KeyError(key)
  dict_to[key] = val
 return dict_to

def safe_update ( dict_to , dict_from ) : for ( key , val ) in dict ( dict_from ) . iteritems ( ) : if ( key in dict_to ) : raise KeyError ( key ) dict_to [ key ] = val return dict_to
re-make update dictionary for safe updating .