Strange problem when running python code

ishtar2020 ishtar2020 at hotmail.com
Tue Apr 4 15:01:12 EDT 2006


I must add, when the python interpreter displays the traceback,  with
the line that is producing the error, it doesn't look like the one I
got in the code.

This is the line where the interpreter finds the error

       if text.list[i].toString() in limits:list)): <- Here is where
the error is found, but this line is not on my file

SyntaxError: invalid syntax

And this is the line I got on the file, looks like the interpreter is
mixing the second sentence with the end of the first one:

for i in range(self.initialPositionl+1,len(text.list)):
            if text.list[i].toString() in limits:
                self.finalPosition=i
                break

It's quite puzzling. And if I change some lousy thing, like inserting a
newline between the sentences, the interpreter will find another error
somewhere else, even when that
part of the code was working flawlessly in previous runs




More information about the Python-list mailing list