def __qsympify_sequence_helper(seq):
 if (not is_sequence(seq)):
  if isinstance(seq, Matrix):
   return seq
  elif isinstance(seq, string_types):
   return Symbol(seq)
  else:
   return sympify(seq)
 if isinstance(seq, QExpr):
  return seq
 result = [__qsympify_sequence_helper(item) for item in seq]
 return Tuple(*result)

def __qsympify_sequence_helper ( seq ) : if ( not is_sequence ( seq ) ) : if isinstance ( seq , Matrix ) : return seq elif isinstance ( seq , string_types ) : return Symbol ( seq ) else : return sympify ( seq ) if isinstance ( seq , QExpr ) : return seq result = [ __qsympify_sequence_helper ( item ) for item in seq ] return Tuple ( * result )
helper function for _qsympify_sequence this function does the actual work .