def rUpdate(original, updates):
 dictPairs = [(original, updates)]
 while (len(dictPairs) > 0):
  (original, updates) = dictPairs.pop()
  for (k, v) in updates.iteritems():
   if ((k in original) and isinstance(original[k], dict) and isinstance(v, dict)):
    dictPairs.append((original[k], v))
   else:
    original[k] = v

def rUpdate ( original , updates ) : dictPairs = [ ( original , updates ) ] while ( len ( dictPairs ) > 0 ) : ( original , updates ) = dictPairs . pop ( ) for ( k , v ) in updates . iteritems ( ) : if ( ( k in original ) and isinstance ( original [ k ] , dict ) and isinstance ( v , dict ) ) : dictPairs . append ( ( original [ k ] , v ) ) else : original [ k ] = v
recursively updates the values in original with the values from updates .