def _eval(val, onts, mdb_safe):
 if isinstance(val, basestring):
  val = val.strip()
  if (not val):
   return None
  else:
   return val
 elif (isinstance(val, dict) or isinstance(val, SamlBase)):
  return to_dict(val, onts, mdb_safe)
 elif isinstance(val, list):
  lv = []
  for v in val:
   if (isinstance(v, dict) or isinstance(v, SamlBase)):
    lv.append(to_dict(v, onts, mdb_safe))
   else:
    lv.append(v)
  return lv
 return val

def _eval ( val , onts , mdb_safe ) : if isinstance ( val , basestring ) : val = val . strip ( ) if ( not val ) : return None else : return val elif ( isinstance ( val , dict ) or isinstance ( val , SamlBase ) ) : return to_dict ( val , onts , mdb_safe ) elif isinstance ( val , list ) : lv = [ ] for v in val : if ( isinstance ( v , dict ) or isinstance ( v , SamlBase ) ) : lv . append ( to_dict ( v , onts , mdb_safe ) ) else : lv . append ( v ) return lv return val
convert a value to a basic dict format .