def recursive_update_dict(root, changes, ignores=()):
 if isinstance(changes, dict):
  for (k, v) in changes.items():
   if isinstance(v, dict):
    if (k not in root):
     root[k] = {}
    recursive_update_dict(root[k], v, ignores)
   elif (v in ignores):
    if (k in root):
     root.pop(k)
   else:
    root[k] = v

def recursive_update_dict ( root , changes , ignores = ( ) ) : if isinstance ( changes , dict ) : for ( k , v ) in changes . items ( ) : if isinstance ( v , dict ) : if ( k not in root ) : root [ k ] = { } recursive_update_dict ( root [ k ] , v , ignores ) elif ( v in ignores ) : if ( k in root ) : root . pop ( k ) else : root [ k ] = v
update recursively all the entries from a dict and its children dicts .