code: def fastaRead(fileHandleOrFile):
      
      fileHandle = _getFileHandle(fileHandleOrFile)
      line = fileHandle.readline()
      chars_to_remove = "\n "
      valid_chars = {x for x in string.ascii_letters + "-"}
      while line != '':
          if line[0] == '>':
              name = line[1:-1]
              line = fileHandle.readline()
              seq = array.array('c')
              while line != '' and line[0] != '>':
                  line = line.translate(None, chars_to_remove)
                  if len(line) > 0 and line[0] != '#':
                      seq.extend(line)
                  line = fileHandle.readline()
              try:
                  assert all(x in valid_chars for x in seq)
              except AssertionError:
                  bad_chars = {x for x in seq if x not in valid_chars}
                  raise RuntimeError("Invalid FASTA character(s) see in fasta sequence: {}".format(bad_chars))
              yield name, seq.tostring()
          else:
              line = fileHandle.readline()
      if isinstance(fileHandleOrFile, "".__class__):
          fileHandle.close()
docs: iteratively yields a sequence for each '>' it encounters, ignores '#' lines