def _dict_deep_update(d, u):
 for (k, v) in u.items():
  if isinstance(v, collections.Mapping):
   r = _dict_deep_update(d.get(k, {}), v)
   d[k] = r
  else:
   d[k] = u[k]
 return d

def _dict_deep_update ( d , u ) : for ( k , v ) in u . items ( ) : if isinstance ( v , collections . Mapping ) : r = _dict_deep_update ( d . get ( k , { } ) , v ) d [ k ] = r else : d [ k ] = u [ k ] return d
from URL .