def _fix_list_encoding(var):
 if isinstance(var, (list, tuple)):
  return filter((lambda x: (x is not None)), map(_to_unicode, var))
 return var

def _fix_list_encoding ( var ) : if isinstance ( var , ( list , tuple ) ) : return filter ( ( lambda x : ( x is not None ) ) , map ( _to_unicode , var ) ) return var
converts each item in a list to unicode .