This doesn't cause a crash, but rather incorrect results.

self.wordList    =    ["The", "quick", "brown", "fox", "carefully",
                "jumps", "over", "the", "lazy", "dog", "as", "it",
                "stealthily", "wends", "its", "way", "homewards", '\b.']
for    i    in    range (len (self.wordList) ):
   if    not isinstance(self.wordList[i], str):
       self.wordList = ""
  elif self.wordList[i] != "" and self.wordList[i][0] == "\b":
print ("0: wordList[", i, "] = \"", self.wordList[i], "\"", sep = "") print ("0a: wordList[", i, "][1] = \"", self.wordList[i][1], "\"", sep = "") tmp = self.wordList[i][1] ## !! Kludge -- remove tmp to see the error self.wordList[i] = tmp + self.wordList[i][1:-1] ## !! Kludge -- remove tmp + to see the error print ("1: wordList[", i, "] = \"", self.wordList[i], "\"", sep = "")
       print    ("len(wordList[", i, "]) = ", len(self.wordList[i]) )

--
Charles Hixson

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to